Esempio n. 1
0
        public override bool Equals(object obj)
        {
            MissingMethod other = obj as MissingMethod;

            return(other != null &&
                   other.declaringType == declaringType &&
                   other.name == name &&
                   other.signature.Equals(signature));
        }
Esempio n. 2
0
        internal override MethodBase FindMethod(string name, MethodSignature signature)
        {
            MethodInfo method = new MissingMethod(this, name, signature);

            if (name == ".ctor")
            {
                return(new ConstructorInfoImpl(method));
            }
            return(method);
        }
Esempio n. 3
0
 internal MethodBase GetMissingMethodOrThrow(Type declaringType, string name, MethodSignature signature)
 {
     if (resolveMissingMembers)
     {
         MethodInfo method = new MissingMethod(declaringType, name, signature);
         if (name == ".ctor")
         {
             return(new ConstructorInfoImpl(method));
         }
         return(method);
     }
     throw new MissingMethodException(declaringType.ToString(), name);
 }
Esempio n. 4
0
 internal MethodBase GetMissingMethodOrThrow(Module requester, Type declaringType, string name, MethodSignature signature)
 {
     if (resolveMissingMembers)
     {
         MethodBase method = new MissingMethod(declaringType, name, signature);
         if (name == ".ctor")
         {
             method = new ConstructorInfoImpl((MethodInfo)method);
         }
         if (ResolvedMissingMember != null)
         {
             ResolvedMissingMember(requester, method);
         }
         return(method);
     }
     throw new MissingMethodException(declaringType.ToString(), name);
 }
Esempio n. 5
0
		public MethodBase __CreateMissingMethod(string name, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
		{
			MethodSignature sig = new MethodSignature(
				returnType ?? this.Module.universe.System_Void,
				Util.Copy(parameterTypes),
				PackedCustomModifiers.CreateFromExternal(returnTypeOptionalCustomModifiers, returnTypeRequiredCustomModifiers, parameterTypeOptionalCustomModifiers, parameterTypeRequiredCustomModifiers, parameterTypes.Length),
				callingConvention,
				0);
			MethodInfo method = new MissingMethod(this, name, sig);
			if (name == ".ctor" || name == ".cctor")
			{
				return new ConstructorInfoImpl(method);
			}
			return method;
		}
Esempio n. 6
0
 internal ParameterInfoImpl(MissingMethod method, int index)
 {
     this.method = method;
     this.index  = index;
 }
Esempio n. 7
0
 public MissingGenericMethodBuilder(Type declaringType, CallingConventions callingConvention, string name, int genericParameterCount)
 {
     method = new MissingMethod(declaringType, name, new MethodSignature(null, null, new PackedCustomModifiers(), callingConvention, genericParameterCount));
 }
Esempio n. 8
0
			internal ParameterInfoImpl(MissingMethod method, int index)
			{
				this.method = method;
				this.index = index;
			}
Esempio n. 9
0
		internal override MethodBase FindMethod(string name, MethodSignature signature)
		{
			MethodInfo method = new MissingMethod(this, name, signature);
			if (name == ".ctor")
			{
				return new ConstructorInfoImpl(method);
			}
			return method;
		}
Esempio n. 10
0
		public MissingGenericMethodBuilder(Type declaringType, CallingConventions callingConvention, string name, int genericParameterCount)
		{
			method = new MissingMethod(declaringType, name, new MethodSignature(null, null, new PackedCustomModifiers(), callingConvention, genericParameterCount));
		}
Esempio n. 11
0
File: Type.cs Progetto: nestalk/mono
		private MethodBase CreateMissingMethod(string name, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, PackedCustomModifiers customModifiers)
		{
			MethodSignature sig = new MethodSignature(
				returnType ?? this.Module.universe.System_Void,
				Util.Copy(parameterTypes),
				customModifiers,
				callingConvention,
				0);
			MethodInfo method = new MissingMethod(this, name, sig);
			if (name == ".ctor" || name == ".cctor")
			{
				return new ConstructorInfoImpl(method);
			}
			return method;
		}