C# Класс HandCoded.Meta.Specification

Instances of the Specification class represent XML based data models such as those for the standards FpML and FixML.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Add() публичный Метод

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.
Результат void

ForDocument() публичный статический Метод

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.
Результат Specification

ForName() публичный статический Метод

Attempts to locate the Specification instance corresponding to the given name.
public static ForName ( string name ) : Specification
name string The target Specification name.
Результат Specification

GetHashCode() публичный Метод

Returns a hash code for this instance based on its name.
public GetHashCode ( ) : int
Результат int

GetReleaseForDocument() публичный Метод

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.
Результат Release

GetReleaseForVersion() публичный Метод

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.
Результат Release

GetReleaseForVersionAndNamespace() публичный Метод

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.
Результат SchemaRelease

IsInstance() публичный Метод

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.
Результат bool

ReleaseForDocument() публичный статический Метод

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.
Результат Release

Remove() публичный Метод

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.
Результат void

Specification() публичный Метод

Constructs a Specification with the given name.
public Specification ( string name ) : System
name string The unique name for the Specification.
Результат System

ToString() публичный Метод

Converts the Specification to a string for debugging.
public ToString ( ) : string
Результат string