/// <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; }
/// <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"); } }
/// <summary> /// Default ctor /// </summary> public NetArrayType(NetTypeReference elementType) { this.elementType = elementType; }
/// <summary> /// Default ctor /// </summary> public NetCustomAttribute(NetTypeReference type, params object[] ctorArguments) { this.type = type; ConstructorArguments.AddRange(ctorArguments); }
/// <summary> /// Default ctor /// </summary> public NetGenericInstanceType(NetTypeDefinition elementType, NetTypeReference declaringType) { this.elementType = elementType; this.declaringType = declaringType; }
/// <summary> /// Set the generic argument at the given index /// </summary> public void SetGenericArgument(int index, NetTypeReference value) { genericArguments[index] = value; }
/// <summary> /// Default ctor /// </summary> public NetNullableType(NetTypeReference elementType) { this.elementType = elementType; }