PostSharp SDK6.6//Post­Sharp.​Sdk.​Code­Model Namespace/Assembly­Ref­Declaration Class

AssemblyRefDeclaration Class

Represents a reference to an external assembly (AssemblyRef).
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.6.3.0 (6.6.3.0)
Syntax
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.

Constructors
  NameDescription
Public methodAssemblyRefDeclaration
Initializes a new AssemblyRefDeclaration.
Properties
  NameDescription
Public propertyAttributes
Gets or sets the assembly reference attributes.
Public propertyCulture
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyHashAlgorithm
Public propertyHashValue
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyIsRetargetable
Public propertyIsStronglyNamed
Public propertyIsWeaklyReferenced
Determines whether the current declaration is weakly or strongly referenced in the current module.
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyName
Gets or sets the name of the current declaration.
(Inherited from NamedMetadataDeclaration.)
Public propertyOriginalDeclaration
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.)
Public propertyOriginalName (Inherited from NamedMetadataDeclaration.)
Public propertyParentMember
Gets the parent member of the current declaration.
(Overrides MetadataDeclaration.ParentMember.)
Public propertyParentType
Gets the parent type of the current declaration.
(Overrides MetadataDeclaration.ParentType.)
Public propertyProcessorArchitecture
Public propertyVersion
Methods
  NameDescription
Public methodClearCache
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().)
Public methodDispose Obsolete. (Inherited from MetadataDeclaration.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindType
Public methodGetAssemblyEnvelope
Gets the AssemblyEnvelope corresponding to the current instance in the current domain.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPublicKey
Gets the public key.
Public methodGetPublicKeyToken
Gets the public key token.
Public methodGetSystemAssembly
Gets the reflection Assembly corresponding to the current instance.
Public methodGetTag<T>
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.)
Public methodGetTokenType
Gets the TokenType of the derived declaration.
(Overrides MetadataDeclaration.GetTokenType().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemove
Remove the current declaration from its parent.
Public methodSetPublicKey
Sets the public key.
Public methodSetPublicKeyToken
Sets the public key token.
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Overrides NamedMetadataDeclaration.ToString().)
Public methodTranslate
Translates the current AssemblyManifestDeclaration into a different ModuleDeclaration.
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions)
Writes the name of the current declaration to a StringBuilder.
Public methodWriteReflectionName(StringBuilder, ReflectionNameOptions, NameMapper)
Writes the name of the current declaration to a StringBuilder and specifies a NameMapper.
Extension Methods
  NameDescription
Public Extension MethodDefinitionMatchesReference (Defined by CompareExtensions.)
Public Extension MethodDefinitionMatchesReferenceResolved (Defined by CompareExtensions.)
Public Extension MethodEquals (Defined by AssemblyNameExtensions.)
Public Extension MethodEvaluateAssemblyMatchResolved (Defined by CompareExtensions.)
Public Extension MethodGetBindingIdentity
Gets the binding identity of an assembly represented by an IAssemblyName.
(Defined by AssemblyNameExtensions.)
Public Extension MethodGetDisplayName
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodGetFullName
Gets the full name of an assembly.
(Defined by AssemblyNameExtensions.)
Public Extension MethodGetReferenceName
Returns a string that can be passed to Load(AssemblyName)
(Defined by AssemblyNameExtensions.)
Public Extension MethodGetReflectionName()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.)
Public Extension MethodGetReflectionName(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.)
Public Extension MethodGetReflectionName(ReflectionNameOptions, NameMapper)Overloaded.
Gets the name of a given declaration, constructed using given options.
(Defined by WriteReflectionNameExtensions.)
Public Extension MethodSetBindingContext (Defined by AssemblyNameExtensions.)
Public Extension MethodSetRetargetable (Defined by AssemblyNameExtensions.)
Public Extension MethodToAssemblyIdentity(String, Guid, FrameworkName)Overloaded. (Defined by AssemblyNameExtensions.)
Public Extension MethodToAssemblyIdentity(String, Guid, FrameworkName, Boolean)Overloaded. (Defined by AssemblyNameExtensions.)
Public Extension MethodToAssemblyName
Converts an IAssemblyName into an AssemblyName.
(Defined by AssemblyNameExtensions.)
Remarks
Assembly references are owned by the module (ModuleDeclaration) an are exposed by the AssemblyRefs collection.
See Also