public DefaultRuntimeMetadataAccess(MethodReference methodReference, MetadataUsage metadataUsage, MethodUsage methodUsage) { this._metadataUsage = metadataUsage; this._methodUsage = methodUsage; if (methodReference != null) { this._typeResolver = new Unity.IL2CPP.ILPreProcessor.TypeResolver(methodReference.DeclaringType as GenericInstanceType, methodReference as GenericInstanceMethod); } else { this._typeResolver = new Unity.IL2CPP.ILPreProcessor.TypeResolver(); } }
public static IRuntimeMetadataAccess GetDefaultRuntimeMetadataAccess(MethodReference method, MetadataUsage metadataUsage, MethodUsage methodUsage) { DefaultRuntimeMetadataAccess defaultRuntimeMetadataAccess = new DefaultRuntimeMetadataAccess(method, metadataUsage, methodUsage); return(((method == null) || !GenericSharingAnalysis.IsSharedMethod(method)) ? ((IRuntimeMetadataAccess)defaultRuntimeMetadataAccess) : ((IRuntimeMetadataAccess) new SharedRuntimeMetadataAccess(method, defaultRuntimeMetadataAccess))); }