예제 #1
0
        public MethodReference ImportReference(MethodReference method, IGenericParameterProvider context)
        {
            Mixin.CheckMethod(method);

            if (method.Module == this)
            {
                return(method);
            }

            CheckContext(context, this);

            return(MetadataImporter.ImportReference(method, context));
        }
예제 #2
0
        public virtual MethodDefinition Resolve(MethodReference method)
        {
            Mixin.CheckMethod(method);
            TypeDefinition typeDefinition = Resolve(method.DeclaringType);

            if (typeDefinition == null)
            {
                return(null);
            }
            method = method.GetElementMethod();
            if (!typeDefinition.HasMethods)
            {
                return(null);
            }
            return(GetMethod(typeDefinition, method));
        }
예제 #3
0
 public virtual MethodReference ImportReference(MethodReference method, IGenericParameterProvider context)
 {
     Mixin.CheckMethod(method);
     return(ImportMethod(method, ImportGenericContext.For(context)));
 }
예제 #4
0
 public virtual MethodReference ImportReference(MethodBase method, IGenericParameterProvider context)
 {
     Mixin.CheckMethod(method);
     return(ImportMethod(method, ImportGenericContext.For(context), (context != null) ? ImportGenericKind.Open : ImportGenericKind.Definition));
 }
예제 #5
0
 internal MethodSpecification(MethodReference method)
 {
     Mixin.CheckMethod(method);
     this.method = method;
     base.token  = new MetadataToken(TokenType.MethodSpec);
 }
예제 #6
0
 public MethodReference ImportReference(MethodBase method, IGenericParameterProvider context)
 {
     Mixin.CheckMethod(method);
     CheckContext(context, this);
     return(ReflectionImporter.ImportReference(method, context));
 }