ITypeDefinition Interface
Provides the base requirements of a type definition.
public interface ITypeDefinition : IReflectionDefinition, ITypeReference
Properties
Access
A TypeAccess indicating the current type's access visibility.
ArrayRank
The number of dimensions in the current type, if the type is an array.
BaseTypes
The collection of base types inherited/implemented by the current type.
DeclaringType
The ITypeDefinition representing the enclosing type, if the current type is a nested type.
DocumentationComment
The optional documentation comment, if the current type is defined in source code.
ElementType
The type of the object encompassed or referred to by the current array, pointer, or reference type,
or null if the current type is not an array or a pointer, or is not passed by reference,
or represents a generic type or a type parameter in the definition of a generic type or generic method.
FullName
The fully qualified name of the type, including the namespace of the type but not the assembly.
IsAbstract
Indicates whether the current type is abstract and must be overridden.
IsAdvanced
Indicates whether the current type is decorated such that it should only be visible to advanced users within an editor.
IsAnonymous
Indicates whether the current type is an anonymous type.
IsArray
Indicates whether the current type is an array.
IsByReference
Indicates whether the current type is passed by reference.
IsExtension
Indicates whether the current type is decorated as a static class that can contain extension methods.
IsGenericTypeDefinition
Indicates whether the current type is a generic type definition, from which other generic types can be constructed.
IsHidden
Indicates whether the current type is decorated such that it should never be visible within an editor.
IsNested
Indicates a value indicating whether the current type object represents a type whose definition is nested inside the definition of another type.
IsObsolete
Indicates whether the current type is decorated as obsolete.
IsPointer
Indicates whether the current type is a pointer.
IsReadOnly
Indicates whether the current type is marked as read-only.
IsRecord
Indicates whether the class or structure is marked as a record.
IsSealed
Indicates whether the current type is declared sealed.
IsStandardModule
Indicates whether the current type is decorated as a standard module class.
Kind
A TypeDefinitionKind that indicates the kind of type definition.
Members
The collection of members that are defined within the current type.
Namespace
The namespace of the type.
NestedTypes
The collection of nested types that are defined within the current type.
SourceFileLocations
The collection of source file locations that contain the current type's declarations.
ISourceFileLocationCollection SourceFileLocations { get; }
Property Value
Remarks
This property only knows source file locations for type definitions loaded from code.
TypeParameters
The collection of generic type parameters, when the current type is a generic type definition.
Methods
GetNamespaceDeclaration(ISourceFileLocation?)
Returns the INamespaceDeclaration that declared the current type, if the type came from a parsed source file.
INamespaceDeclaration? GetNamespaceDeclaration(ISourceFileLocation? location)
| Parameter | Type | Description |
|---|---|---|
| location | ISourceFileLocation | The optional ISourceFileLocation that provides contextual information, used when this is a merged type definition to select the most appropriate namespace declaration result. |
Returns
- INamespaceDeclaration:
The INamespaceDeclaration that declared the current type, if the type came from a parsed source file.
Inherited Members
- IReflectionDefinition.Name
- ITypeReference.AssemblyName
- ITypeReference.IsGenericType
- ITypeReference.IsTypeDefinition
- ITypeReference.IsTypeParameter
- ITypeReference.QualifiedName
- ITypeReference.TypeArguments