C# Class Cilador.Fody.Core.ModuleWeaver

The ModuleWeaver.Execute() method is invoked by Fody as a Visual Studio post-build step. This type serves to start the weaving process and to manage the configuration of the Fody weaver. It is also passed around as needed to other types in the aspect of a IWeavingContext.
Inheritance: IDisposable, IPartImportsSatisfiedNotification, IWeavingContext
Show file Open project: rileywhite/Cilador Class Usage Examples

Private Properties

Property Type Description
Dispose void
ExtractWeaveAttributesByTargetTypes List>.Dictionary
FindAndInvokeWeavers void
GetWeaverFor IWeave
IPartImportsSatisfiedNotification void

Public Methods

Method Description
Dispose ( ) : void

Releases resources used by the ModuleWeaver in a deterministic manner

Execute ( ) : void

Executes the Cilador code weaving logic.

When run as a Fody addin withing Visual Studio, Fody invokes this method after setting all configuration data.

ModuleWeaver ( ) : System

Creates a new ModuleWeaver.

ReadCiladorConfig ( System.Xml.Linq.XElement config ) : CiladorConfigType

Deserializes a CiladorConfigType from within a config. XElement

The configuration type, CiladorConfigType, is primarily generated from WeaveConfig.xsd.

Private Methods

Method Description
Dispose ( bool isDisposing ) : void

Releases resources used by the ModuleWeaver

ExtractWeaveAttributesByTargetTypes ( ) : List>.Dictionary

Looks at all types within the target assembly, and collects any that are annotated with weave attributes. Weave command attributes are removed from types as they are gathered.

FindAndInvokeWeavers ( Mono.Cecil.TypeDefinition targetType, List weaveAttributes ) : void

Looks up commands indicated by weave attributes thorugh configuration, and then executes each command.

GetWeaverFor ( Mono.Cecil.TypeDefinition targetType, CustomAttribute weaveAttribute ) : IWeave

Finds the weave that corresponds to a given weave attribute for a type

IPartImportsSatisfiedNotification ( ) : void

Called by MEF when a part's imports have been satisfied and it is safe to use. For this type, it rebuilds some configuration information based on the imported weaver.

Method Details

Dispose() public method

Releases resources used by the ModuleWeaver in a deterministic manner
public Dispose ( ) : void
return void

Execute() public method

Executes the Cilador code weaving logic.
When run as a Fody addin withing Visual Studio, Fody invokes this method after setting all configuration data.
public Execute ( ) : void
return void

ModuleWeaver() public method

Creates a new ModuleWeaver.
public ModuleWeaver ( ) : System
return System

ReadCiladorConfig() public static method

Deserializes a CiladorConfigType from within a config. XElement
The configuration type, CiladorConfigType, is primarily generated from WeaveConfig.xsd.
public static ReadCiladorConfig ( System.Xml.Linq.XElement config ) : CiladorConfigType
config System.Xml.Linq.XElement Item that contains the serialized config element.
return CiladorConfigType