Exemple #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));
        }
Exemple #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);
        }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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;
		}
Exemple #6
0
 internal ParameterInfoImpl(MissingMethod method, int index)
 {
     this.method = method;
     this.index  = index;
 }
Exemple #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));
 }
Exemple #8
0
			internal ParameterInfoImpl(MissingMethod method, int index)
			{
				this.method = method;
				this.index = index;
			}
Exemple #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;
		}
Exemple #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));
		}
Exemple #11
0
		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;
		}