Substrate.Factories Module


This module defines the following types:

SubstrateParserFactory Type

The SubstrateParserFactory is used to construct parsers for different types of substrates. In order to have dependency injection, parsers are registered at run-time (see Factories.Initializer project)

Methods

Modifiers Return type Method name Method parameters Description
static unit RegisterParser Type, string, Type Given a substrate type (type implementing ISubstrate), a syntax kind (e.g., "simple", "typed") and a parser type (type implementing ISubstrateParser) it stores this information to be used when a request to construct a parser arrives
static ISubstrateParser SubstrateParser ISubstrate, string, string, IParsingContext option Given a substrate, a syntax kind and a parsing context it attempts to find a registered substrate parser that matches. If successful, it returns such a ISubstrateParser implementation, on which the substrate, the namespace and the parsing context have been set using the appropiate setters

 

SubstrateFactory Type

The SubstrateFactory provides a factory to construct different substrates.

Methods

Modifiers Return type Method name Method parameters Description
static ISubstrate Substrate string, string list, string list Construct a Substrate. A substrate kind, substrate arguments (such as connection string, in the case of SQL) and namespaces must be provided

 

SubstratePrettyPrinterFactory Type

The SubstratePrettyPrinterFactory is used to construct pretty printers for different types of substrates. In order to have dependency injection, pretty printers are registered at run-time (see Factories.Initializer project)

Methods

Modifiers Return type Method name Method parameters Description
static unit RegisterPrettyPrinter Type, string, Type Given a substrate type (type implementing ISubstrate), a syntax kind (e.g., "simple", "typed") and a pretty printer type (type implementing ISubstratePrettyPrinter) it stores this information to be used when a request to construct a pretty printer arrives
static ISubstratePrettyPrinter SubstratePrettyPrinter ISubstrate, string Given a substrate and a syntax kind it attempts to find a registered substrate pretty printer that matches. If successful, it returns such a ISubstratePrettyPrinter implementation

 

Automatically generated on 6/10/2011 2:28:40 PM
 

Last edited Jun 10, 2011 at 9:37 PM by gdecaso, version 2

Comments

No comments yet.