TypeSpecDeclaration Class |
Represents a type specification (TypeSpec).
System.Object
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.TypeSpecDeclaration
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.TypeSpecDeclaration
Namespace: PostSharp.Sdk.CodeModel
Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
C#
public sealed class TypeSpecDeclaration : MetadataDeclaration, IType, ITypeSignatureDeclaration, ITypeSignature, IModuleElement, IVisitable<ITypeSignature>, IGeneric, IEquatable<ITypeSignature>, IWriteReflectionName, IDeclaration, IElement, IMember, IMetadataDeclaration, ITaggable, INamed, IMemberRefResolutionScope, IGenericInstance
The TypeSpecDeclaration type exposes the following members.
Name | Description | |
---|---|---|
TypeSpecDeclaration |
Initializes a new TypeSpecDeclaration.
|
Name | Description | |
---|---|---|
Attributes |
Gets or sets the type attributes.
| |
CustomDebuggingInformation | (Inherited from Declaration.) | |
IsGenericInstance |
Determines whether the current instance is a generic instance, i.e. whether it has
been constructed from a generic definition.
| |
IsOriginal |
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.) | |
IsSealed |
Determines whether the type is sealed. When a type is sealed, it not possible to have a type that derives from this type.
| |
IsStatic | ||
MetadataToken |
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.) | |
Name | ||
OriginalDeclaration |
When the declaration represents another declaration in the source assembly, this property refers to this declaration.
When using GetReflectionObject(Type[], Type[], BindingOptions), the original declaration should actually be retrieved.
(Inherited from MetadataDeclaration.) | |
ParentMember |
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.) | |
ParentType |
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.) | |
Signature |
Gets or sets the type signature specifying the current type specification.
| |
Visibility |
Name | Description | |
---|---|---|
ClearCache |
Clear the cache (typically mapping to System.Reflection or,
if the current element is a reference, to the related definition)
of the current Element and all its children.
(Inherited from Element.) | |
ContainsGenericArguments | ||
Dispose | Obsolete. (Inherited from MetadataDeclaration.) | |
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Equals(ITypeSignature) | Indicates whether the current object is equal to another object of the same type. | |
GetCanonicalHashCode |
Gets a hash code that is invariant under type signature equality
(i.e. if two types are equal under IEquatable<T>, they have the
same canonical hash code).
| |
GetGenericArgument |
Gets a generic (concrete, bound) argument given its ordinal.
| |
GetGenericContext |
Gets the generic context inside the scope of the generic instance.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetSiblings |
Gets all instances of TypeSpecDeclaration that have the same signature.
| |
GetSystemType(Type[], Type[]) |
Gets the system, runtime Type corresponding to the current type.
| |
GetSystemType(Type[], Type[], BindingOptions) |
Gets the system, runtime Type corresponding to the current type.
| |
GetTag<T> |
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.) | |
GetTokenType |
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetTypeDefinition() | ||
GetTypeDefinition(BindingOptions) |
Finds in the current domain the TypeDefDeclaration corresponding
to the current type and specifies BindingOptions.
| |
GetValueSize |
Gets the size of the value type.
| |
IsValueTypeSafe | ||
MapGenericArguments |
Resolves all generic arguments in the current type signature.
| |
MatchesReference |
Determines whether the current type signature matches a given type signature.
| |
SetTag<T> |
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.) | |
ToString | (Inherited from MetadataDeclaration.) | |
Translate | ||
Unwrap |
Conditionally unwraps the ITypeSignature contained in a TypeSpecDeclaration.
| |
Visit | ||
WriteReflectionName(StringBuilder, ReflectionNameOptions) |
Writes the name of the current declaration to a StringBuilder.
| |
WriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper) |
Writes the name of the current declaration to a StringBuilder and
specifies a NameMapper.
|
Name | Description | |
---|---|---|
FindMethod(IMethod) | Overloaded. (Defined by TypeSignatureExtensions.) | |
FindMethod(String, IMethodSignature, BindingOptions) | Overloaded. (Defined by TypeSignatureExtensions.) | |
GetAssignmentDistance(ITypeSignature) | Overloaded. (Defined by TypeSignatureExtensions.) | |
GetAssignmentDistance(ITypeSignature, GenericMap) | Overloaded. (Defined by TypeSignatureExtensions.) | |
GetDisplayName |
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName() | Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString
method of system reflection objects.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName(ReflectionNameOptions) | Overloaded.
Gets the name of a given declaration and returns a string that is compatible with the result of the ToString
method of system reflection objects.
(Defined by WriteReflectionNameExtensions.) | |
GetReflectionName(ReflectionNameOptions, NameMapper) | Overloaded.
Gets the name of a given declaration, constructed using given options.
(Defined by WriteReflectionNameExtensions.) | |
Is<T> | (Defined by TypeSignatureExtensions.) | |
IsAbstract() | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsAbstract() | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsAssignableFromRuntimeType | (Defined by TypeSignatureExtensions.) | |
IsAssignableFromRuntimeValue |
Determines whether a given type signature can be assigned a given runtime value.
(Defined by TypeSignatureExtensions.) | |
IsAssignableTo(ITypeSignature) | Overloaded.
Determines whether instances of the current type is assignable to
locations of a specified type (i.e. whether the current type derives
or implements this type).
(Defined by TypeSignatureExtensions.) | |
IsAssignableTo(ITypeSignature, GenericMap) | Overloaded.
Determines whether instances of the current type is assignable to
locations of a specified type (i.e. whether the current type derives
or implements this type) and specifies a GenericMap.
(Defined by TypeSignatureExtensions.) | |
IsAssignableToRuntimeType | (Defined by TypeSignatureExtensions.) | |
IsByRef | (Defined by TypeSignatureExtensions.) | |
IsDelegate | (Defined by TypeSignatureExtensions.) | |
IsEnum | (Defined by TypeSignatureExtensions.) | |
IsExternallyVisible() | Overloaded. (Defined by VisibilityHelper.) | |
IsExternallyVisible() | Overloaded.
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.) | |
IsInterface() | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsInterface() | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsIntrinsic | (Defined by TypeSignatureExtensions.) | |
IsNullable |
Determines whether a given type signature can be assigned a null value.
(Defined by TypeSignatureExtensions.) | |
IsPointer(Nullable<Boolean>) | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsPointer(Nullable<Boolean>, PointerTypeSignature) | Overloaded. (Defined by TypeSignatureExtensions.) | |
IsPublic |
Determines whether a member is visible outside its assembly.
(Defined by VisibilityHelper.) | |
IsValueType |
Returns true if the type signature is a value type; false if it's a reference type; and throws a NullReferenceException if it's
a generic parameter or if for some other reason we don't know if it's value or reference type. Consider using IsValueTypeSafe() == true instead.
(Defined by TypeSignatureExtensions.) | |
IsVisible |
Determines whether a member is visible from a given scope.
(Defined by VisibilityHelper.) | |
ToType | (Defined by TypeSignatureExtensions.) |
Type specifications are owned by ModuleDeclaration.