Beispiel #1
0
        public MethodDefinition Resolve(MethodReference method)
        {
            TypeDefinition type = Resolve(method.DeclaringType);

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

            method = method.GetOriginalMethod();
            if (method.Name == MethodDefinition.Cctor || method.Name == MethodDefinition.Ctor)
            {
                return(type.HasConstructors ? GetMethod(type.Constructors, method) : null);
            }
            else
            {
                return(type.HasMethods ? GetMethod(type, method) : null);
            }
        }
Beispiel #2
0
        public MethodDefinition Resolve(MethodReference method)
        {
            TypeDefinition type = Resolve (method.DeclaringType);
            if (type == null)
                return null;

            method = method.GetOriginalMethod ();
            if (method.Name == MethodDefinition.Cctor || method.Name == MethodDefinition.Ctor)
                return type.HasConstructors ? GetMethod (type.Constructors, method) : null;
            else
                return type.HasMethods ? GetMethod (type, method) : null;
        }
Beispiel #3
0
 public override MethodReference GetOriginalMethod()
 {
     return(m_elementMethod.GetOriginalMethod());
 }