PublicApiNamedTypeReference Class
A reference to a class, struct, interface, enum or delegate, optionally constructed with type arguments.
public sealed class PublicApiNamedTypeReference : PublicApiTypeReferenceRemarks
A nested type references its containing type through PublicApiNamedTypeReference.ContainingType. Each level only holds its own type arguments, so Outer<string>.Inner<int> has int as type argument and a containing type constructed with string. Primitive types, such as int or string, are represented by their System type.
- Inheritance
PublicApiTypeReferencePublicApiNamedTypeReference
Properties
| Name | Description |
|---|---|
| AssemblyName | Gets the simple name of the assembly that declares the type, as referenced by the inspected assembly. It is null when the assembly cannot be determined from metadata, for instance for a type name serialized in an attribute without an assembly name. |
| ContainingType | Gets the containing type when the referenced type is nested. |
| DocumentationId | Gets the XML documentation ID of the referenced type definition (e.g. T:System.Collections.Generic.List`1). |
| FullName | Gets the metadata full name of the referenced type definition, using + to separate nested types (e.g. System.Collections.Generic.Dictionary`2+Enumerator). |
| IsNullableValueType | Gets a value indicating whether the type is a constructed Nullable<T>. |
| IsTupleType | Gets a value indicating whether the type is a constructed ValueTuple. |
| IsValueType | Gets a value indicating whether the signature encodes the type as a value type. |
| Kind | |
| MetadataName | Gets the metadata name of the type, including the generic arity suffix (e.g. List`1). |
| Name | Gets the name of the type, without the generic arity suffix (e.g. List). |
| Namespace | Gets the namespace of the type. It is empty for nested types and for types of the global namespace. |
| TupleElementNames | Gets the element names of a tuple type. It is empty when the type is not a tuple or when its elements are not named. Unnamed elements are null. |
| TypeArguments | Gets the type arguments declared at this nesting level. It is empty for non-generic types. |
AssemblyName
PublicApiNamedTypeReference.csGets the simple name of the assembly that declares the type, as referenced by the inspected assembly. It is null when the assembly cannot be determined from metadata, for instance for a type name serialized in an attribute without an assembly name.
public string? AssemblyName { get; }Property value
ContainingType
PublicApiNamedTypeReference.csGets the containing type when the referenced type is nested.
public PublicApiNamedTypeReference? ContainingType { get; }Property value
DocumentationId
PublicApiNamedTypeReference.csFullName
PublicApiNamedTypeReference.csIsNullableValueType
PublicApiNamedTypeReference.csGets a value indicating whether the type is a constructed Nullable<T>.
public bool IsNullableValueType { get; }Property value
IsTupleType
PublicApiNamedTypeReference.csGets a value indicating whether the type is a constructed ValueTuple.
public bool IsTupleType { get; }Property value
IsValueType
PublicApiNamedTypeReference.cspublic override PublicApiTypeReferenceKind Kind { get; }Property value
No documentation is available.
MetadataName
PublicApiNamedTypeReference.csNamespace
PublicApiNamedTypeReference.csTupleElementNames
PublicApiNamedTypeReference.csGets the element names of a tuple type. It is empty when the type is not a tuple or when its elements are not named. Unnamed elements are null.
public ImmutableArray<string?> TupleElementNames { get; }Property value
Remarks
For tuples of more than 7 elements, the names of the remaining elements are stored on the nested TRest type argument.
TypeArguments
PublicApiNamedTypeReference.csGets the type arguments declared at this nesting level. It is empty for non-generic types.
public ImmutableArray<PublicApiTypeReference> TypeArguments { get; }