AssemblyRefDeclaration Class |
Represents a reference to an external assembly (AssemblyRef).
System.Object
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.NamedMetadataDeclaration
PostSharp.Sdk.CodeModel.AssemblyRefDeclaration
PostSharp.Sdk.CodeModel.Element
PostSharp.Sdk.CodeModel.Declaration
PostSharp.Sdk.CodeModel.MetadataDeclaration
PostSharp.Sdk.CodeModel.NamedMetadataDeclaration
PostSharp.Sdk.CodeModel.AssemblyRefDeclaration
Namespace: PostSharp.Sdk.CodeModel
Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public sealed class AssemblyRefDeclaration : NamedMetadataDeclaration, ITypeRefResolutionScope, IMetadataDeclaration, IDeclaration, IElement, IModuleElement, ITaggable, IAssembly, IAssemblyName, IManifestResourceImplementation, IWeakReferenceable, IRemovable, IAssemblyDeclaration, IWriteReflectionName
The AssemblyRefDeclaration type exposes the following members.
Name | Description | |
---|---|---|
AssemblyRefDeclaration |
Initializes a new AssemblyRefDeclaration.
|
Name | Description | |
---|---|---|
Attributes |
Gets or sets the assembly reference attributes.
| |
Culture | ||
CustomDebuggingInformation | (Inherited from Declaration.) | |
HashAlgorithm | ||
HashValue | ||
IsOriginal |
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.) | |
IsRetargetable | ||
IsStronglyNamed | ||
IsWeaklyReferenced |
Determines whether the current declaration is weakly or strongly
referenced in the current module.
| |
MetadataToken |
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.) | |
Name |
Gets or sets the name of the current declaration.
(Inherited from NamedMetadataDeclaration.) | |
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.) | |
OriginalName | (Inherited from NamedMetadataDeclaration.) | |
ParentMember |
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.) | |
ParentType |
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.) | |
ProcessorArchitecture | ||
Version |
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.
(Overrides Element.ClearCache().) | |
Dispose | Obsolete. (Inherited from MetadataDeclaration.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
FindType | ||
GetAssemblyEnvelope |
Gets the AssemblyEnvelope corresponding to the current instance
in the current domain.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetPublicKey |
Gets the public key.
| |
GetPublicKeyToken |
Gets the public key token.
| |
GetSystemAssembly |
Gets the reflection Assembly corresponding
to the current instance.
| |
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.) | |
Remove |
Remove the current declaration from its parent.
| |
SetPublicKey |
Sets the public key.
| |
SetPublicKeyToken |
Sets the public key token.
| |
SetTag<T> |
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.) | |
ToString | (Overrides NamedMetadataDeclaration.ToString().) | |
Translate |
Translates the current AssemblyManifestDeclaration into a different ModuleDeclaration.
| |
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 | |
---|---|---|
DefinitionMatchesReference | (Defined by CompareExtensions.) | |
DefinitionMatchesReferenceResolved | (Defined by CompareExtensions.) | |
Equals | (Defined by AssemblyNameExtensions.) | |
EvaluateAssemblyMatchResolved | (Defined by CompareExtensions.) | |
GetBindingIdentity |
Gets the binding identity of an assembly represented by an IAssemblyName.
(Defined by AssemblyNameExtensions.) | |
GetDisplayName |
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.) | |
GetFullName |
Gets the full name of an assembly.
(Defined by AssemblyNameExtensions.) | |
GetReferenceName |
Returns a string that can be passed to Load(AssemblyName) (Defined by AssemblyNameExtensions.) | |
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.) | |
SetBindingContext | (Defined by AssemblyNameExtensions.) | |
SetRetargetable | (Defined by AssemblyNameExtensions.) | |
ToAssemblyIdentity(String, Guid, FrameworkName) | Overloaded. (Defined by AssemblyNameExtensions.) | |
ToAssemblyIdentity(String, Guid, FrameworkName, Boolean) | Overloaded. (Defined by AssemblyNameExtensions.) | |
ToAssemblyName |
Converts an IAssemblyName into an AssemblyName.
(Defined by AssemblyNameExtensions.) |
Assembly references are owned
by the module (ModuleDeclaration) an are exposed by
the AssemblyRefs collection.