1- // Copyright (C) 2009-2020 Xtensive LLC.
1+ // Copyright (C) 2009-2021 Xtensive LLC.
22// This code is distributed under MIT license terms.
33// See the License.txt file in the project root for more information.
44// Created by: Alexis Kochetov
@@ -22,13 +22,26 @@ namespace Xtensive.Orm.Linq.Materialization
2222{
2323 internal static class MaterializationHelper
2424 {
25- public static readonly MethodInfo MaterializeMethodInfo ;
26- public static readonly MethodInfo GetDefaultMethodInfo ;
27- public static readonly MethodInfo CreateItemMaterializerMethodInfo ;
28- public static readonly MethodInfo CreateNullableItemMaterializerMethodInfo ;
29- public static readonly MethodInfo IsNullMethodInfo ;
30- public static readonly MethodInfo ThrowEmptySequenceExceptionMethodInfo ;
31- public static readonly MethodInfo PrefetchEntitySetMethodInfo ;
25+ public static readonly MethodInfo MaterializeMethodInfo = typeof ( MaterializationHelper )
26+ . GetMethod ( nameof ( Materialize ) , BindingFlags . Public | BindingFlags . Static ) ;
27+
28+ public static readonly MethodInfo GetDefaultMethodInfo = typeof ( MaterializationHelper )
29+ . GetMethod ( nameof ( GetDefault ) , BindingFlags . Public | BindingFlags . Static ) ;
30+
31+ public static readonly MethodInfo CreateItemMaterializerMethodInfo = typeof ( MaterializationHelper )
32+ . GetMethod ( nameof ( CreateItemMaterializer ) , BindingFlags . Public | BindingFlags . Static ) ;
33+
34+ public static readonly MethodInfo CreateNullableItemMaterializerMethodInfo = typeof ( MaterializationHelper )
35+ . GetMethod ( nameof ( CreateNullableItemMaterializer ) , BindingFlags . Public | BindingFlags . Static ) ;
36+
37+ public static readonly MethodInfo IsNullMethodInfo = typeof ( MaterializationHelper )
38+ . GetMethod ( nameof ( IsNull ) , BindingFlags . Public | BindingFlags . Static ) ;
39+
40+ public static readonly MethodInfo ThrowEmptySequenceExceptionMethodInfo = typeof ( MaterializationHelper )
41+ . GetMethod ( nameof ( ThrowEmptySequenceException ) , BindingFlags . Public | BindingFlags . Static ) ;
42+
43+ public static readonly MethodInfo PrefetchEntitySetMethodInfo = typeof ( MaterializationHelper )
44+ . GetMethod ( nameof ( PrefetechEntitySet ) , BindingFlags . Public | BindingFlags . Static ) ;
3245
3346 public static int [ ] CreateSingleSourceMap ( int targetLength , Pair < int > [ ] remappedColumns )
3447 {
@@ -106,25 +119,5 @@ public static TEntitySet PrefetechEntitySet<TEntitySet>(TEntitySet entitySet, It
106119 new List < PrefetchFieldDescriptor > { new PrefetchFieldDescriptor ( entitySet . Field , WellKnown . EntitySetPreloadCount ) } ) ;
107120 return entitySet ;
108121 }
109-
110- // Type initializer
111-
112- static MaterializationHelper ( )
113- {
114- MaterializeMethodInfo = typeof ( MaterializationHelper )
115- . GetMethod ( nameof ( Materialize ) , BindingFlags . Public | BindingFlags . Static ) ;
116- CreateItemMaterializerMethodInfo = typeof ( MaterializationHelper )
117- . GetMethod ( nameof ( CreateItemMaterializer ) , BindingFlags . Public | BindingFlags . Static ) ;
118- CreateNullableItemMaterializerMethodInfo = typeof ( MaterializationHelper )
119- . GetMethod ( nameof ( CreateNullableItemMaterializer ) , BindingFlags . Public | BindingFlags . Static ) ;
120- GetDefaultMethodInfo = typeof ( MaterializationHelper )
121- . GetMethod ( nameof ( GetDefault ) , BindingFlags . Public | BindingFlags . Static ) ;
122- IsNullMethodInfo = typeof ( MaterializationHelper )
123- . GetMethod ( nameof ( IsNull ) , BindingFlags . Public | BindingFlags . Static ) ;
124- ThrowEmptySequenceExceptionMethodInfo = typeof ( MaterializationHelper )
125- . GetMethod ( nameof ( ThrowEmptySequenceException ) , BindingFlags . Public | BindingFlags . Static ) ;
126- PrefetchEntitySetMethodInfo = typeof ( MaterializationHelper )
127- . GetMethod ( nameof ( PrefetechEntitySet ) , BindingFlags . Public | BindingFlags . Static ) ;
128- }
129122 }
130123}
0 commit comments