Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new <see cref="Parameter"/>.
 /// </summary>
 /// <param name="attributes">The <see cref="Attributes"/>.</param>
 /// <param name="modifiers">The <see cref="Modifiers"/>.</param>
 /// <param name="type">The parameter's type.</param>
 /// <param name="name">The parameter's name.</param>
 /// <param name="defaultValue">The <see cref="DefaultValue"/>.</param>
 public Parameter(
     AttributeCollection?attributes,
     ParameterModifier modifiers,
     ExtendedTypeName type,
     string name,
     string?defaultValue
     )
 {
     Attributes   = attributes ?? new AttributeCollection();
     Modifiers    = modifiers;
     Type         = type;
     Name         = name;
     DefaultValue = defaultValue;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new <see cref="Field"/>.
 /// </summary>
 /// <param name="fieldType">The field type.</param>
 /// <param name="fieldName">The optional field name.</param>
 public Field(ExtendedTypeName fieldType, string?fieldName = null)
 {
     FieldType = fieldType;
     FieldName = fieldName;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new <see cref="ExtendedTypeName"/> that defines an array of <see cref="ExtendedTypeName"/>.
 /// </summary>
 /// <param name="type">The item array type.</param>
 /// <param name="arrayDimensions">An optional list of array dimensions. See <see cref="ArrayDimensions"/>.</param>
 /// <param name="isNullable">True to specify an explicit nullable type.</param>
 public ExtendedTypeName(ExtendedTypeName type, IReadOnlyList <int> arrayDimensions, bool isNullable = false)
 {
     ItemArrayType   = type ?? throw new ArgumentNullException(nameof(type));
     ArrayDimensions = arrayDimensions;
     IsNullable      = isNullable;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new generic parameter.
 /// </summary>
 /// <param name="v">The variance.</param>
 /// <param name="t">The type.</param>
 public GenParam(Variance v, ExtendedTypeName t)
 {
     TypeVariance = v;
     Type         = t;
 }