C# Class HandCoded.Meta.Conversion

A Conversion instance encapsulates the knowledge of how to transform an XML document from one Release of a Specification to another.
It is expected that most conversions will be between different releases of the same specification but the code allows for the discovery of inter-specification conversions.
Show file Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Private Properties

Property Type Description
DepthFirstSearch Conversion

Public Methods

Method Description
ConversionFor ( Release source, Release target ) : Conversion

Attempts to find a Conversion that will transform a XmlDocument between the two specified releases. The releases must be different, null transformations are not allowed.

Convert ( XmlDocument document, IHelper helper ) : XmlDocument

Applies the Conversion to a XmlDocument instance to create a new XmlDocument.

Protected Methods

Method Description
Conversion ( ) : System

Constructs a Conversion instance.

Private Methods

Method Description
DepthFirstSearch ( Release source, Release target, Stack stack ) : Conversion

Recursively explores the Release definitions to determine the shortest conversion path between two releases.

Method Details

Conversion() protected method

Constructs a Conversion instance.
protected Conversion ( ) : System
return System

ConversionFor() public static method

Attempts to find a Conversion that will transform a XmlDocument between the two specified releases. The releases must be different, null transformations are not allowed.
public static ConversionFor ( Release source, Release target ) : Conversion
source Release The source to convert from.
target Release The target to convert to.
return Conversion

Convert() public abstract method

Applies the Conversion to a XmlDocument instance to create a new XmlDocument.
public abstract Convert ( XmlDocument document, IHelper helper ) : XmlDocument
document System.Xml.XmlDocument The to be converted.
helper IHelper A used to guide conversion.
return System.Xml.XmlDocument