Beispiel #1
0
 public MethodParamRep(TypeRep Type, ParameterDirection Direction, string ParamName, int Position, ClrRepTag?Tag = null)
     : base(ParamName)
 {
     this.Type      = Type;
     this.Direction = Direction;
     this.Position  = Position;
 }
Beispiel #2
0
 public static MethodSig Define(MethodInfo method)
 {
     return(new MethodSig(
                method.MetadataToken,
                method.Module.Assembly.GetSimpleName(),
                method.Module.Name,
                method.DeclaringType.Namespace,
                method.DeclaringType.Name,
                method.DisplayName(),
                TypeRep.FromType(method.ReturnType),
                method.GetParameters().Select(p => new MethodParamRep(TypeRep.FromParameter(p), p.Direction(), p.Name, p.Position)).ToArray(),
                method.GenericSlots().Mapi((i, t) => new TypeParamRep(t.DisplayName(), i, t.IsGenericType))));
 }
Beispiel #3
0
 public MethodSig(int MethodId, string DefiningAssembly, string DefiningModule, string DeclaringNamespace, string DeclaringType, string MethodName, TypeRep ReturnType, MethodParamReps ValueParams, TypeParamReps TypeParams)
 {
     this.MethodId         = MethodId;
     this.DefiningAssembly = DefiningAssembly;
     this.DefiningModule   = DefiningModule;
     this.DeclaringType    = DeclaringType;
     this.MethodName       = MethodName;
     this.ReturnType       = ReturnType;
     this.ValueParams      = ValueParams;
     this.TypeParams       = TypeParams;
 }