GetTypeReference() public method

public GetTypeReference ( Type type ) : TypeReference
type System.Type
return Mono.Cecil.TypeReference
コード例 #1
0
        public static void Initialize()
        {
            ModuleDefinition = ModuleWeaver.Instance.ModuleDefinition;
            ReferenceFinder = new ReferenceFinder(ModuleDefinition);

            StaticProxyAttribute = RetrieveStaticProxyAttributeReference();

            InterceptorModuleDefinition = ResolveInterceptorModuleDefinition();

            TypeDefinition dynamicInterceptorManagerTypeDefinition = InterceptorModuleDefinition.GetTypeDefinition("IDynamicInterceptorManager");
            DynamicInterceptorManagerReference = ModuleDefinition.ImportReference(dynamicInterceptorManagerTypeDefinition);

            ObjectTypeReference = ReferenceFinder.GetTypeReference(typeof(object));
        }
コード例 #2
0
        public static void Initialize()
        {
            ModuleDefinition = ModuleWeaver.Instance.ModuleDefinition;
            ReferenceFinder  = new ReferenceFinder(ModuleDefinition);

            StaticProxyAttribute = ModuleDefinition.GetTypeReference("StaticProxyAttribute");

            InterceptorModuleDefinition = ResolveInterceptorModuleDefinition();

            TypeDefinition dynamicInterceptorManagerTypeDefinition = InterceptorModuleDefinition.GetTypeDefinition("IDynamicInterceptorManager");

            DynamicInterceptorManagerReference = ModuleDefinition.Import(dynamicInterceptorManagerTypeDefinition);

            ObjectTypeReference = ReferenceFinder.GetTypeReference(typeof(object));
        }