C# Class Microsoft.Cci.Ast.Module

An object that represents a .NET module.
Inheritance: Unit, IModule
Mostra file Open project: visualmutator/visualmutator

Private Properties

Property Type Description
IModule IEnumerable
IModule IEnumerable
IModule IEnumerable

Public Methods

Method Description
Dispatch ( IMetadataVisitor visitor ) : void

Calls visitor.Visit(IModule).

DispatchAsReference ( IMetadataVisitor visitor ) : void

Calls visitor.Visit(IModuleReference).

GetAllTypes ( ) : IEnumerable

Returns all of the types in the current module.

GetStrings ( ) : IEnumerable

Returns zero or more strings used in the module. If the module is produced by reading in a CLR PE file, then this will be the contents of the user string heap. If the module is produced some other way, the method may return an empty enumeration or an enumeration that is a subset of the strings actually used in the module. The main purpose of this method is to provide a way to control the order of strings in a prefix of the user string heap when writing out a module as a PE file.

Protected Methods

Method Description
CreateRootNamespace ( ) : RootUnitNamespace

Returns a root namepace object that is language specific.

Most languages will probably just use the base method, but some languages may want to allocate a root namespace that has added behavior that, for example, helps with language specific name lookup rules.

GetAttributes ( ) : List

Returns a list of custom attributes that describes this type declaration member. Typically, these will be derived from this.SourceAttributes. However, some source attributes might instead be persisted as metadata bits and other custom attributes may be synthesized from information not provided in the form of source custom attributes. The list is not trimmed to size, since an override of this method may call the base method and then add more attributes.

Module ( IName name, string location, IAssembly containingAssembly, IEnumerable assemblyReferences, IEnumerable moduleReferences ) : System

Allocates an object that represents a .NET module.

Private Methods

Method Description
IModule ( ) : IEnumerable
IModule ( ) : IEnumerable
IModule ( ) : IEnumerable

Method Details

CreateRootNamespace() protected method

Returns a root namepace object that is language specific.
Most languages will probably just use the base method, but some languages may want to allocate a root namespace that has added behavior that, for example, helps with language specific name lookup rules.
protected CreateRootNamespace ( ) : RootUnitNamespace
return RootUnitNamespace

Dispatch() public method

Calls visitor.Visit(IModule).
public Dispatch ( IMetadataVisitor visitor ) : void
visitor IMetadataVisitor
return void

DispatchAsReference() public method

Calls visitor.Visit(IModuleReference).
public DispatchAsReference ( IMetadataVisitor visitor ) : void
visitor IMetadataVisitor
return void

GetAllTypes() public method

Returns all of the types in the current module.
public GetAllTypes ( ) : IEnumerable
return IEnumerable

GetAttributes() protected method

Returns a list of custom attributes that describes this type declaration member. Typically, these will be derived from this.SourceAttributes. However, some source attributes might instead be persisted as metadata bits and other custom attributes may be synthesized from information not provided in the form of source custom attributes. The list is not trimmed to size, since an override of this method may call the base method and then add more attributes.
protected GetAttributes ( ) : List
return List

GetStrings() public method

Returns zero or more strings used in the module. If the module is produced by reading in a CLR PE file, then this will be the contents of the user string heap. If the module is produced some other way, the method may return an empty enumeration or an enumeration that is a subset of the strings actually used in the module. The main purpose of this method is to provide a way to control the order of strings in a prefix of the user string heap when writing out a module as a PE file.
public GetStrings ( ) : IEnumerable
return IEnumerable

Module() protected method

Allocates an object that represents a .NET module.
protected Module ( IName name, string location, IAssembly containingAssembly, IEnumerable assemblyReferences, IEnumerable moduleReferences ) : System
name IName The name of the unit.
location string An indication of the location where the unit is or will be stored. This need not be a file system path and may be empty. /// The interpretation depends on the ICompilationHostEnviroment instance used to resolve references to this unit.
containingAssembly IAssembly The assembly that contains this module.
assemblyReferences IEnumerable A list of the assemblies that are referenced by this module.
moduleReferences IEnumerable A list of the modules that are referenced by this module.
return System