PublicApiGenericParameter Class
A generic parameter of a type or of a method, with its constraints.
public sealed class PublicApiGenericParameterProperties
| Name | Description |
|---|---|
| AllowsRefLikeType | Gets a value indicating whether the parameter has the allows ref struct anti-constraint. |
| Attributes | |
| ConstraintTypes | Gets the base type and interface constraints: the base type, then the other constraints sorted by name. The System.ValueType constraint that encodes struct is not included. |
| HasConstructorConstraint | Gets a value indicating whether the parameter has the new() constraint. It is not set when the struct constraint implies it. |
| HasReferenceTypeConstraint | Gets a value indicating whether the parameter has the class constraint. |
| HasUnmanagedTypeConstraint | |
| HasValueTypeConstraint | Gets a value indicating whether the parameter has the struct constraint. It is also set for the unmanaged constraint. |
| IsMethodTypeParameter | |
| Name | |
| NullableAnnotation | Gets the nullable annotation of the generic parameter. With the class constraint, PublicApiNullableAnnotation.Annotated means class?. Without the class and struct constraints, PublicApiNullableAnnotation.NotAnnotated means notnull. |
| Ordinal | Gets the position of the generic parameter. For a nested type, the position includes the generic parameters of its containing types, as in metadata. |
| Variance |
AllowsRefLikeType
PublicApiGenericParameter.csAttributes
PublicApiGenericParameter.cspublic ImmutableArray<PublicApiAttribute> Attributes { get; }Property value
No documentation is available.
ConstraintTypes
PublicApiGenericParameter.csGets the base type and interface constraints: the base type, then the other constraints sorted by name. The System.ValueType constraint that encodes struct is not included.
public ImmutableArray<PublicApiTypeReference> ConstraintTypes { get; }Property value
HasConstructorConstraint
PublicApiGenericParameter.csHasReferenceTypeConstraint
PublicApiGenericParameter.csHasUnmanagedTypeConstraint
PublicApiGenericParameter.csHasValueTypeConstraint
PublicApiGenericParameter.csIsMethodTypeParameter
PublicApiGenericParameter.csNullableAnnotation
PublicApiGenericParameter.csGets the nullable annotation of the generic parameter. With the class constraint, PublicApiNullableAnnotation.Annotated means class?. Without the class and struct constraints, PublicApiNullableAnnotation.NotAnnotated means notnull.
public PublicApiNullableAnnotation NullableAnnotation { get; }Property value
Ordinal
PublicApiGenericParameter.csVariance
PublicApiGenericParameter.csMethods
| Name | Description |
|---|---|
| ToString() |