PostSharp SDK6.7//Post­Sharp.​Sdk.​Code­Model Namespace/Module­Declaration Class

ModuleDeclaration Class

Represents a module (Module).
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.7.10.0 (6.7.10.0)
Syntax
C#
public sealed class ModuleDeclaration : NamedMetadataDeclaration, 
	IModule, ITypeRefResolutionScope, IMetadataDeclaration, IDeclaration, IElement, 
	IModuleElement, ITaggable, ITypeContainer, IWriteReflectionName

The ModuleDeclaration type exposes the following members.

Constructors
  NameDescription
Public methodModuleDeclaration(Domain)
Initializes a new instance of the ModuleDeclaration class
Public methodModuleDeclaration(Domain, ImageProperties)
Initializes a new ModuleDeclaration.
Properties
  NameDescription
Public propertyAssembly
Public propertyCustomDebuggingInformation (Inherited from Declaration.)
Public propertyEntryPoint
Gets or sets the entry point of the current module.
Public propertyFileName
Gets the name of the file containing the module.
Public propertyImageProperties
Public propertyIsDisposed (Overrides MetadataDeclaration.IsDisposed.)
Public propertyIsMscorlib
Determines whether the current module is mscorlib.
Public propertyIsObfuscated
Determines whether the current module is obfuscated.
Public propertyIsOriginal
Determines whether the current declaration existed in the source assembly.
(Inherited from MetadataDeclaration.)
Public propertyMetadataToken
Gets or sets the token of the current declaration.
(Inherited from MetadataDeclaration.)
Public propertyModuleGuid
Gets or sets the GUID of the current module.
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
Gets the ProcessorArchitecture information from the PE headers.
Public propertySourceDocuments
Methods
  NameDescription
Public methodClearAllTags
Removes, from all elements of this module (MetadataDeclaration only), all tags of a given Guid.
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.
(Inherited from Element.)
Public methodDispose
Releases all resources used by the ModuleDeclaration
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindAssembly(IAssemblyName, BindingOptions)
Finds in the current module an assembly corresponding to a given AssemblyName.
Public methodFindAssembly(Assembly, BindingOptions)
Finds in the current module an assembly corresponding to a given runtime assembly.
Public methodFindDeclaration(Object, MetadataDeclaration, TokenType)
Finds a declaration given its reflection object and returns it translated for the current module.
Public methodFindDeclaration(Object, Boolean, MetadataDeclaration, TokenType)
Finds a declaration given its reflection object and returns it translated for the current module.
Public methodFindField(FieldInfo, BindingOptions)
Finds in the current module a field given its runtime representation (FieldInfo).
Public methodFindField(INamedType, String)
Finds a field defined in a type (given as an ITypeSignature) and translates it for the current module.
Public methodFindField(TypeDefDeclaration, String)
Finds a field defined in a TypeDefDeclaration and translates it for the current module.
Public methodFindMethod(MethodBase, BindingOptions)
Finds in the current module a method given its runtime representation (MethodBase).
Public methodFindMethod(String, String)
Finds a method in a type given its name.
Public methodFindMethod(INamedType, String)
Finds a method in the current module given its declaring type and the method name.
Public methodFindMethod(String, String, BindingOptions)
Finds a method in a type given its name.
Public methodFindMethod(String, String, Int32)
Finds a method in a type given its name and number of parameters.
Public methodFindMethod(String, String, Predicate<MethodDefDeclaration>)
Finds a method given the name of its declaring type, the method name, and a predicate.
Public methodFindMethod(String, String, String[])
Finds a method in a type given its name and the name of the parameter types.
Public methodFindMethod(INamedType, String, Int32)
Finds a method in the current module given its declaring type, its name, and its number of parameters.
Public methodFindMethod(INamedType, String, Predicate<MethodDefDeclaration>)
Finds a method in the current module given its declaring type, its name, and a predicate.
Public methodFindMethod(TypeDefDeclaration, String, Predicate<MethodDefDeclaration>)
Finds a method in the current module given its declaring type, its name, and a predicate.
Public methodFindMethod(String, String, BindingOptions, Int32)
Finds a method in a type given its name and number of parameters.
Public methodFindMethod(String, String, BindingOptions, Predicate<MethodDefDeclaration>)
Finds a method given the name of its declaring type, the method name, and a predicate.
Public methodFindMethod(String, String, BindingOptions, String[])
Finds a method in a type given its name and the name of the parameter types.
Public methodFindMethod(INamedType, String, BindingOptions, Int32)
Finds a method in the current module given its declaring type, its name, and its number of parameters.
Public methodFindMethod(INamedType, String, BindingOptions, Predicate<MethodDefDeclaration>)
Finds a method in the current module given its declaring type, its name, and a predicate.
Public methodFindMethod(TypeDefDeclaration, String, BindingOptions, Predicate<MethodDefDeclaration>)
Finds a method in the current module given its declaring type, its name, and a predicate.
Public methodFindType(Type)
Finds in the current module a type given its runtime representation.
Public methodFindType(String, BindingOptions)
Finds in the current module a type given its full name.
Public methodFindType(Type, BindingOptions)
Finds in the current module a type given its runtime representation and specifies BindingOptions.
Public methodGetDeclarationEnumerator
Gets an enumeration of declarations of a given type.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetMethodSignature
Gets a MethodSignature for a MethodBase.
Public methodGetSystemModule
Gets the runtime module corresponding to the current instance.
Public methodGetTag<T>
Gets a tag associated with the current declaration.
(Inherited from MetadataDeclaration.)
Public methodGetTagDirectory<T>
Gets the tag directory of the current module. This directory contains all values of a given tag for all elements of the current module.
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 methodGetType(ITypeSignature)
Gets a IType given a ITypeSignature.
Public methodGetTypeSignatureDeclaration
Public methodLoadDebugReader
Public methodSetTag<T>
Set a tag to the current declaration.
(Inherited from MetadataDeclaration.)
Public methodToString (Inherited from NamedMetadataDeclaration.)
Extension Methods
  NameDescription
Public Extension MethodGetDisplayName
Gets the name of a given declaration as it should be displayed to the user.
(Defined by WriteReflectionNameExtensions.)
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.)
Remarks

Since PostSharp is module-centric, a module contains all other declarations.

See Also