C# Class HandCoded.Meta.Specification

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat void

ForDocument() public static méthode

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.
Résultat Specification

ForName() public static méthode

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

GetHashCode() public méthode

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

GetReleaseForDocument() public méthode

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.
Résultat Release

GetReleaseForVersion() public méthode

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.
Résultat Release

GetReleaseForVersionAndNamespace() public méthode

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.
Résultat SchemaRelease

IsInstance() public méthode

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.
Résultat bool

ReleaseForDocument() public static méthode

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.
Résultat Release

Remove() public méthode

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.
Résultat void

Specification() public méthode

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

ToString() public méthode

Converts the Specification to a string for debugging.
public ToString ( ) : string
Résultat string