Esempio n. 1
0
 /// <summary>
 /// Add a generic argument to the end of the list.
 /// </summary>
 public void AddGenericArgument(NetTypeReference argument, TypeNameMap typeNameMap)
 {
     if (argument.IsVoid())
     {
         argument = typeNameMap.Object;
     }
     genericArguments.Add(argument);
 }
 /// <summary>
 /// Mark this method as an explicit interface implementation.
 /// </summary>
 public void SetExplicitImplementation(NetMethodDefinition iMethod, NetTypeReference iType)
 {
     if (iMethod == null)
     {
         throw new ArgumentNullException("iMethod");
     }
     if (iType == null)
     {
         throw new ArgumentNullException("iType");
     }
     InterfaceMethod = iMethod;
     InterfaceType   = iType;
 }
Esempio n. 3
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NetParameterDefinition(string name, NetTypeReference type, bool isParams)
 {
     if (type.IsVoid())
     {
         throw new ArgumentException("type cannot be void");
     }
     this.name     = Keywords.IsKeyword(name) ? "@" + name : name;
     this.type     = type;
     this.isParams = isParams;
     if (isParams && !(type is NetArrayType))
     {
         throw new ArgumentException("Params parameter must have array type");
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NetArrayType(NetTypeReference elementType)
 {
     this.elementType = elementType;
 }
Esempio n. 5
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NetCustomAttribute(NetTypeReference type, params object[] ctorArguments)
 {
     this.type = type;
     ConstructorArguments.AddRange(ctorArguments);
 }
Esempio n. 6
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NetGenericInstanceType(NetTypeDefinition elementType, NetTypeReference declaringType)
 {
     this.elementType   = elementType;
     this.declaringType = declaringType;
 }
Esempio n. 7
0
 /// <summary>
 /// Set the generic argument at the given index
 /// </summary>
 public void SetGenericArgument(int index, NetTypeReference value)
 {
     genericArguments[index] = value;
 }
Esempio n. 8
0
 /// <summary>
 /// Default ctor
 /// </summary>
 public NetNullableType(NetTypeReference elementType)
 {
     this.elementType = elementType;
 }