C# Class HandCoded.Meta.Specification

Instances of the Specification class represent XML based data models such as those for the standards FpML and FixML.
Mostra file Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Methods

Method Description
Add ( Release release ) : void

Adds the indicated Release instance to the set managed by the Specification.

ForDocument ( XmlDocument document ) : Specification

Attempts to locate the Specification instance corresponding to the given XmlDocument.

ForName ( string name ) : Specification

Attempts to locate the Specification instance corresponding to the given name.

GetHashCode ( ) : int

Returns a hash code for this instance based on its name.

GetReleaseForDocument ( XmlDocument document ) : Release

Attempts to locate a Release of the current Specification that is compatible with the given XmlDocument.

GetReleaseForVersion ( string version ) : Release

Attempts to locate a Release associated with this Specification with the indicated version identifier.

GetReleaseForVersionAndNamespace ( string version, string namespaceUri ) : SchemaRelease

Attempts to locate a SchemaRelease associated with this Specification with the indicated version identifier and namespace URI.

IsInstance ( XmlDocument document ) : bool

Determines if the given XmlDocument is an instance of some Release of this Specification.

ReleaseForDocument ( XmlDocument document ) : Release

Attempts to locate the Release instance corresponding to the given XmlDocument.

Remove ( Release release ) : void

Removes the indicated Release instance from the set managed by the Specification.

Specification ( string name ) : System

Constructs a Specification with the given name.

ToString ( ) : string

Converts the Specification to a string for debugging.

Private Methods

Method Description
GetClassLoader ( XmlElement context, string defaultClass ) : string

If the releases file defines a custom class loader to be used the process the data block identified by the context element then return its name, otherwise return the indicated default class name.

GetDtdReleaseLoader ( XmlElement context ) : IReleaseLoader

Creates an IReleaseLoader that can process a DTD meta definition.

GetSchemaReleaseLoader ( XmlElement context ) : IReleaseLoader

Creates an IReleaseLoader that can process a schema meta definition.

Specification ( ) : System

Bootstrap the entire collection of specifications by processing the contents of the 'files/releases.xml' file.

ToDebug ( ) : string

Produces a debugging string describing the state of the instance.

Method Details

Add() public method

Adds the indicated Release instance to the set managed by the Specification.
If the is associated /// with a different Specification.
public Add ( Release release ) : void
release Release The to be added.
return void

ForDocument() public static method

Attempts to locate the Specification instance corresponding to the given XmlDocument.
public static ForDocument ( XmlDocument document ) : Specification
document System.Xml.XmlDocument The to be examined.
return Specification

ForName() public static method

Attempts to locate the Specification instance corresponding to the given name.
public static ForName ( string name ) : Specification
name string The target Specification name.
return Specification

GetHashCode() public method

Returns a hash code for this instance based on its name.
public GetHashCode ( ) : int
return int

GetReleaseForDocument() public method

Attempts to locate a Release of the current Specification that is compatible with the given XmlDocument.
public GetReleaseForDocument ( XmlDocument document ) : Release
document System.Xml.XmlDocument The to be examined.
return Release

GetReleaseForVersion() public method

Attempts to locate a Release associated with this Specification with the indicated version identifier.
public GetReleaseForVersion ( string version ) : Release
version string The target version identifier.
return Release

GetReleaseForVersionAndNamespace() public method

Attempts to locate a SchemaRelease associated with this Specification with the indicated version identifier and namespace URI.
public GetReleaseForVersionAndNamespace ( string version, string namespaceUri ) : SchemaRelease
version string The target version identifier.
namespaceUri string The target namespace URI.
return SchemaRelease

IsInstance() public method

Determines if the given XmlDocument is an instance of some Release of this Specification.
public IsInstance ( XmlDocument document ) : bool
document System.Xml.XmlDocument The to be examined.
return bool

ReleaseForDocument() public static method

Attempts to locate the Release instance corresponding to the given XmlDocument.
public static ReleaseForDocument ( XmlDocument document ) : Release
document System.Xml.XmlDocument The to be examined.
return Release

Remove() public method

Removes the indicated Release instance from the set managed by the Specification.
If the is associated /// with a different Specification.
public Remove ( Release release ) : void
release Release The to be removed.
return void

Specification() public method

Constructs a Specification with the given name.
public Specification ( string name ) : System
name string The unique name for the Specification.
return System

ToString() public method

Converts the Specification to a string for debugging.
public ToString ( ) : string
return string