Inheritance: System.Reflection.MethodInfo
Esempio n. 1
0
 internal MethodOnTypeBuilderInst(MethodOnTypeBuilderInst gmd, Type[] typeArguments)
     : this(gmd.instantiation, gmd.base_method)
 {
     this.method_arguments = new Type[typeArguments.Length];
     typeArguments.CopyTo(this.method_arguments, 0);
     this.generic_method_definition = gmd;
 }
Esempio n. 2
0
		internal MethodOnTypeBuilderInst (MethodOnTypeBuilderInst gmd, Type[] typeArguments)
		{
			this.instantiation = gmd.instantiation;
			this.mb = gmd.mb;
			this.method_arguments = new Type [typeArguments.Length];
			typeArguments.CopyTo (this.method_arguments, 0);
			this.generic_method_definition = gmd;
		}
Esempio n. 3
0
 internal override MethodInfo GetMethod(MethodInfo fromNoninstanciated)
 {
     methods ??= new Dictionary <MethodInfo, MethodInfo>();
     if (!methods.TryGetValue(fromNoninstanciated, out MethodInfo? mi))
     {
         methods[fromNoninstanciated] = mi = new MethodOnTypeBuilderInst(this, fromNoninstanciated);
     }
     return(mi);
 }
Esempio n. 4
0
 internal override MethodInfo GetMethod(MethodInfo fromNoninstanciated)
 {
     if (methods == null)
     {
         methods = new Hashtable();
     }
     if (!methods.ContainsKey(fromNoninstanciated))
     {
         methods [fromNoninstanciated] = new MethodOnTypeBuilderInst(this, fromNoninstanciated);
     }
     return((MethodInfo)methods [fromNoninstanciated]);
 }
Esempio n. 5
0
 internal override MethodInfo GetMethod(MethodInfo fromNoninstanciated)
 {
     if (methods == null)
     {
         methods = new Dictionary <MethodInfo, MethodInfo>();
     }
     if (!methods.ContainsKey(fromNoninstanciated))
     {
         methods[fromNoninstanciated] = new MethodOnTypeBuilderInst(this, fromNoninstanciated);
     }
     return(methods[fromNoninstanciated] !);
 }
Esempio n. 6
0
		internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
		{
			initialize ();

			if (methods == null)
				methods = new Hashtable ();
			if (!methods.ContainsKey (fromNoninstanciated))
				methods [fromNoninstanciated] = new MethodOnTypeBuilderInst (this, fromNoninstanciated);
			return (MethodInfo)methods [fromNoninstanciated];
		}
Esempio n. 7
0
		internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
		{
			initialize ();

			if (!(fromNoninstanciated is MethodBuilder))
				throw new InvalidOperationException ("Inflating non MethodBuilder objects is not supported: " + fromNoninstanciated.GetType ());
	
			MethodBuilder mb = (MethodBuilder)fromNoninstanciated;
			if (methods == null)
				methods = new Hashtable ();
			if (!methods.ContainsKey (mb))
				methods [mb] = new MethodOnTypeBuilderInst (this, mb);
			return (MethodInfo)methods [mb];
		}