Beispiel #1
0
 public void AddArguments(Type[] arguments, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
 {
     for (int i = 0; i < arguments.Length; i++)
     {
         __AddArgument(arguments[i], false, CustomModifiers.FromReqOpt(requiredCustomModifiers[i], optionalCustomModifiers[i]));
     }
 }
 // this adds the custom modifiers in the same order as the normal SRE APIs
 // (the advantage over using the SRE APIs is that a CustomModifiers object is slightly more efficient,
 // because unlike the Type arrays it doesn't need to be copied)
 public void Add(Type[] requiredCustomModifiers, Type[] optionalCustomModifiers)
 {
     foreach (CustomModifiers.Entry entry in CustomModifiers.FromReqOpt(requiredCustomModifiers, optionalCustomModifiers))
     {
         Item item;
         item.type     = entry.Type;
         item.required = entry.IsRequired;
         list.Add(item);
     }
 }
Beispiel #3
0
        public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)
        {
            SignatureHelper sig = new SignatureHelper(mod as ModuleBuilder, Signature.PROPERTY);

            sig.callingConvention         = callingConvention;
            sig.returnType                = returnType;
            sig.returnTypeCustomModifiers = CustomModifiers.FromReqOpt(requiredReturnTypeCustomModifiers, optionalReturnTypeCustomModifiers);
            sig.AddArguments(parameterTypes, requiredParameterTypeCustomModifiers, optionalParameterTypeCustomModifiers);
            return(sig);
        }
Beispiel #4
0
 public void AddArguments(Type[] arguments, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)
 {
     if (arguments != null)
     {
         for (int i = 0; i < arguments.Length; i++)
         {
             __AddArgument(arguments[i], false, CustomModifiers.FromReqOpt(Util.NullSafeElementAt(requiredCustomModifiers, i), Util.NullSafeElementAt(optionalCustomModifiers, i)));
         }
     }
 }
Beispiel #5
0
 public FieldBuilder DefineField(string fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes)
 {
     return(__DefineField(fieldName, type, CustomModifiers.FromReqOpt(requiredCustomModifiers, optionalCustomModifiers), attributes));
 }
Beispiel #6
0
 public void AddArgument(Type argument, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers)
 {
     __AddArgument(argument, false, CustomModifiers.FromReqOpt(requiredCustomModifiers, optionalCustomModifiers));
 }