11using System ;
2+ using System . Runtime . CompilerServices ;
23using StructLinq . ForEach ;
34
45// ReSharper disable once CheckNamespace
56namespace StructLinq
67{
78 public static partial class StructEnumerable
89 {
10+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
911 private static void InternalForEach < T , TEnumerator , TAction > ( ref TAction action , TEnumerator enumerator )
1012 where TEnumerator : struct , IStructEnumerator < T >
1113 where TAction : struct , IAction < T >
@@ -17,6 +19,7 @@ private static void InternalForEach<T, TEnumerator, TAction>(ref TAction action,
1719 enumerator . Dispose ( ) ;
1820 }
1921
22+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
2023 public static void ForEach < T , TEnumerator , TAction > ( this IStructEnumerable < T , TEnumerator > enumerable , ref TAction action )
2124 where TEnumerator : struct , IStructEnumerator < T >
2225 where TAction : struct , IAction < T >
@@ -25,6 +28,7 @@ public static void ForEach<T, TEnumerator, TAction>(this IStructEnumerable<T, TE
2528 InternalForEach < T , TEnumerator , TAction > ( ref action , enumerator ) ;
2629 }
2730
31+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
2832 public static void ForEach < T , TEnumerator , TAction , TEnumerable > ( this TEnumerable enumerable , ref TAction action , Func < TEnumerable , IStructEnumerable < T , TEnumerator > > _ )
2933 where TEnumerator : struct , IStructEnumerator < T >
3034 where TAction : struct , IAction < T >
@@ -38,6 +42,7 @@ public static void ForEach<T, TEnumerator, TAction, TEnumerable>(this TEnumerabl
3842 }
3943
4044
45+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
4146 public static void ForEach < T , TEnumerator > ( this IStructEnumerable < T , TEnumerator > enumerable , Action < T > action )
4247 where TEnumerator : struct , IStructEnumerator < T >
4348 {
0 commit comments