Class DefaultTypeParameter
- Namespace
- ICSharpCode.Decompiler.TypeSystem.Implementation
- Assembly
- ICSharpCode.Decompiler.dll
public class DefaultTypeParameter : AbstractTypeParameter, ITypeParameter, IType, INamedElement, IEquatable<IType>, ISymbol, ICompilationProvider
- Inheritance
-
DefaultTypeParameter
- Implements
- Inherited Members
- Extension Methods
Constructors
DefaultTypeParameter(ICompilation, SymbolKind, int, string, VarianceModifier, IReadOnlyList<IAttribute>, bool, bool, bool, IReadOnlyList<IType>, Nullability)
public DefaultTypeParameter(ICompilation compilation, SymbolKind ownerType, int index, string name = null, VarianceModifier variance = VarianceModifier.Invariant, IReadOnlyList<IAttribute> attributes = null, bool hasValueTypeConstraint = false, bool hasReferenceTypeConstraint = false, bool hasDefaultConstructorConstraint = false, IReadOnlyList<IType> constraints = null, Nullability nullabilityConstraint = Nullability.Oblivious)
Parameters
compilation
ICompilationownerType
SymbolKindindex
intname
stringvariance
VarianceModifierattributes
IReadOnlyList<IAttribute>hasValueTypeConstraint
boolhasReferenceTypeConstraint
boolhasDefaultConstructorConstraint
boolconstraints
IReadOnlyList<IType>nullabilityConstraint
Nullability
DefaultTypeParameter(IEntity, int, string, VarianceModifier, IReadOnlyList<IAttribute>, bool, bool, bool, IReadOnlyList<IType>, Nullability)
public DefaultTypeParameter(IEntity owner, int index, string name = null, VarianceModifier variance = VarianceModifier.Invariant, IReadOnlyList<IAttribute> attributes = null, bool hasValueTypeConstraint = false, bool hasReferenceTypeConstraint = false, bool hasDefaultConstructorConstraint = false, IReadOnlyList<IType> constraints = null, Nullability nullabilityConstraint = Nullability.Oblivious)
Parameters
owner
IEntityindex
intname
stringvariance
VarianceModifierattributes
IReadOnlyList<IAttribute>hasValueTypeConstraint
boolhasReferenceTypeConstraint
boolhasDefaultConstructorConstraint
boolconstraints
IReadOnlyList<IType>nullabilityConstraint
Nullability
Properties
HasDefaultConstructorConstraint
Gets if the type parameter has the 'new()' constraint.
public override bool HasDefaultConstructorConstraint { get; }
Property Value
HasReferenceTypeConstraint
Gets if the type parameter has the 'class' constraint.
public override bool HasReferenceTypeConstraint { get; }
Property Value
HasUnmanagedConstraint
Gets if the type parameter has the 'unmanaged' constraint.
public override bool HasUnmanagedConstraint { get; }
Property Value
HasValueTypeConstraint
Gets if the type parameter has the 'struct' or 'unmanaged' constraint.
public override bool HasValueTypeConstraint { get; }
Property Value
NullabilityConstraint
Nullability of the reference type constraint. (e.g. "where T : class?").
Note that the nullability of a use of the type parameter may differ from this. E.g. "T? GetNull<T>() where T : class => null;"
public override Nullability NullabilityConstraint { get; }
Property Value
TypeConstraints
public override IReadOnlyList<TypeConstraint> TypeConstraints { get; }
Property Value
Methods
GetAttributes()
Gets the attributes declared on this type parameter.
public override IEnumerable<IAttribute> GetAttributes()