Beispiel #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));
        }
Beispiel #2
0
        public virtual MethodDefinition Resolve(MethodReference method)
        {
            Mixin.CheckMethod(method);

            var type = Resolve(method.DeclaringType);

            if (type == null)
            {
                return(null);
            }

            method = method.GetElementMethod();

            if (!type.HasMethods)
            {
                return(null);
            }

            return(GetMethod(type, method));
        }
Beispiel #3
0
 public virtual MethodReference ImportReference(MethodReference method, IGenericParameterProvider context)
 {
     Mixin.CheckMethod(method);
     return(ImportMethod(method, ImportGenericContext.For(context)));
 }