C# 클래스 Spring.Objects.Factory.Xml.NamespaceParserRegistry

Provides a resolution mechanism for configuration parsers.

The DefaultObjectDefinitionDocumentReader uses this registry class to find the parser handling a specific namespace.

파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

공개 메소드들

메소드 설명
GetAssemblySchemaLocation ( Type schemaLocationAssemblyHint, string schemaLocation ) : string

Constructs a "assembly://..." qualified schemaLocation url using the given type to obtain the assembly name.

GetParser ( string namespaceURI ) : INamespaceParser

Returns a parser for the given namespace.

GetSchemas ( ) : XmlSchemaSet

Returns a schema collection containing validation schemas for all registered parsers.

RegisterParser ( INamespaceParser parser ) : void

Pegisters parser, using default namespace and schema location as defined by the NamespaceParserAttribute.

RegisterParser ( INamespaceParser parser, string namespaceUri, string schemaLocation ) : void

Associates a parser with a namespace.

Parsers registered with the same namespaceUri as that of a parser that has previously been registered will overwrite the existing parser.

RegisterParser ( Type parserType ) : void

Pegisters parser, using default namespace and schema location as defined by the NamespaceParserAttribute.

RegisterParser ( Type parserType, string namespaceUri, string schemaLocation ) : void

Associates a parser with a namespace.

Parsers registered with the same namespaceUri as that of a parser that has previously been registered will overwrite the existing parser.

Reset ( ) : void

Reset the list of registered parsers to "factory"-setting

use for unit tests only

비공개 메소드들

메소드 설명
GetDefaults ( Type parserType ) : NamespaceParserAttribute

Returns default values for the parser namespace and schema location as defined by the NamespaceParserAttribute.

NamespaceParserRegistry ( ) : System

Creates a new instance of the NamespaceParserRegistry class.

RegisterSchema ( string namespaceUri, string schemaLocation ) : void

Register a schema as well-known

RegisterWellknownNamespaceParserType ( string namespaceUri ) : bool

Registers the INamespaceParser type for wellknown namespaces

메소드 상세

GetAssemblySchemaLocation() 공개 정적인 메소드

Constructs a "assembly://..." qualified schemaLocation url using the given type to obtain the assembly name.
public static GetAssemblySchemaLocation ( Type schemaLocationAssemblyHint, string schemaLocation ) : string
schemaLocationAssemblyHint System.Type
schemaLocation string
리턴 string

GetParser() 공개 정적인 메소드

Returns a parser for the given namespace.
public static GetParser ( string namespaceURI ) : INamespaceParser
namespaceURI string /// The namespace for which to lookup the parser implementation. ///
리턴 INamespaceParser

GetSchemas() 공개 정적인 메소드

Returns a schema collection containing validation schemas for all registered parsers.
public static GetSchemas ( ) : XmlSchemaSet
리턴 System.Xml.Schema.XmlSchemaSet

RegisterParser() 공개 정적인 메소드

Pegisters parser, using default namespace and schema location as defined by the NamespaceParserAttribute.
/// If is . ///
public static RegisterParser ( INamespaceParser parser ) : void
parser INamespaceParser /// The parser instance. ///
리턴 void

RegisterParser() 공개 정적인 메소드

Associates a parser with a namespace.
Parsers registered with the same namespaceUri as that of a parser that has previously been registered will overwrite the existing parser.
/// If is , or if /// is not specified and parser class /// does not have default value defined using . ///
public static RegisterParser ( INamespaceParser parser, string namespaceUri, string schemaLocation ) : void
parser INamespaceParser /// The parser instance. ///
namespaceUri string /// The namespace with which to associate instance of the parser. ///
schemaLocation string /// The location of the XML schema that should be used for validation /// of the XML elements that belong to the specified namespace /// (can be any valid Spring.NET resource URI). ///
리턴 void

RegisterParser() 공개 정적인 메소드

Pegisters parser, using default namespace and schema location as defined by the NamespaceParserAttribute.
/// If is . ///
public static RegisterParser ( Type parserType ) : void
parserType System.Type /// The of the parser that will be activated /// when an element in its default namespace is encountered. ///
리턴 void

RegisterParser() 공개 정적인 메소드

Associates a parser with a namespace.
Parsers registered with the same namespaceUri as that of a parser that has previously been registered will overwrite the existing parser.
/// If the is not a /// that implements the /// interface. /// /// If is . ///
public static RegisterParser ( Type parserType, string namespaceUri, string schemaLocation ) : void
parserType System.Type /// The of the parser that will be activated /// when the attendant is /// encountered. ///
namespaceUri string /// The namespace with which to associate instance of the parser. ///
schemaLocation string /// The location of the XML schema that should be used for validation /// of the XML elements that belong to the specified namespace /// (can be any valid Spring.NET resource URI). ///
리턴 void

Reset() 공개 정적인 메소드

Reset the list of registered parsers to "factory"-setting
use for unit tests only
public static Reset ( ) : void
리턴 void