コード例 #1
0
        public override ParameterInfo [] GetParameters()
        {
            ParameterInfo [] res = null;
            if (!IsCompilerContext)
            {
                throw new NotSupportedException();
            }

            if (base_method is MethodBuilder)
            {
                MethodBuilder mb = (MethodBuilder)base_method;
                res = new ParameterInfo [mb.parameters.Length];
                for (int i = 0; i < mb.parameters.Length; i++)
                {
                    Type type = MonoGenericClass.InflateType(mb.parameters [i], GetTypeArgs(), method_arguments);
                    res [i] = new ParameterInfo(mb.pinfo == null ? null : mb.pinfo [i + 1], type, this, i + 1);
                }
            }
            else
            {
                ParameterInfo[] base_params = base_method.GetParameters();
                res = new ParameterInfo [base_params.Length];
                for (int i = 0; i < base_params.Length; i++)
                {
                    Type type = MonoGenericClass.InflateType(base_params [i].ParameterType, GetTypeArgs(), method_arguments);
                    res [i] = new ParameterInfo(base_params [i], type, this, i + 1);
                }
            }
            return(res);
        }
コード例 #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;
 }
コード例 #3
0
 public MethodOnTypeBuilderInst(MonoGenericClass instantiation, MethodInfo base_method)
 {
     this.instantiation = instantiation;
     this.base_method   = base_method;
 }
コード例 #4
0
 internal PropertyOnTypeBuilderInst(MonoGenericClass instantiation, PropertyInfo prop)
 {
     this.instantiation = instantiation;
     this.prop          = prop;
 }
コード例 #5
0
ファイル: FieldOnTypeBuilderInst.cs プロジェクト: yonder/mono
 public FieldOnTypeBuilderInst(MonoGenericClass instantiation, FieldInfo fb)
 {
     this.instantiation = instantiation;
     this.fb            = fb;
 }
コード例 #6
0
 internal EventOnTypeBuilderInst(MonoGenericClass instantiation, EventBuilder evt)
 {
     this.instantiation = instantiation;
     this.evt           = evt;
 }
コード例 #7
0
 public ConstructorOnTypeBuilderInst(MonoGenericClass instantiation, ConstructorInfo cb)
 {
     this.instantiation = instantiation;
     this.cb            = cb;
 }
コード例 #8
0
 public MethodOnTypeBuilderInst(MonoGenericClass instantiation, MethodBuilder mb)
 {
     this.instantiation = instantiation;
     this.mb            = mb;
 }