ConfigurationDocumentService

Provides services for load and validate configuration documents.

Namespace:
Inetdev.Context.Configuration
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
No
Inherits from:
System.Object

Constructors

ConfigurationDocumentService

Default constructor

Signature:
public Void ConfigurationDocumentService()

Methods

EnumerateObjectConfiguration

Enumerates a list of object configuration from specified document.

Signature:
public IEnumerable<ObjectConfiguration> EnumerateObjectConfiguration(doc)
Returns

A collection of object configuration models from the specified document.

Parameters
Name Type Summary
doc XmlDocument Factory configuration document.
Exceptions
Type Summary
ArgumentNullException Thrown when doc is null.

EnumeratePackageConfiguration

Enumerates a list of package configuration from specified document.

Signature:
public IEnumerable<PackageConfiguration> EnumeratePackageConfiguration(doc)
Returns

A collection of package configuration models from the specified document.

Parameters
Name Type Summary
doc XmlDocument Package configuration document.
Exceptions
Type Summary
ArgumentNullException Thrown when doc is null.

GetFactoryName

Gets the name of the application object factory specified in doc.

Signature:
public String GetFactoryName(doc)
Returns

Configured name of the object factory.

Parameters
Name Type Summary
doc XmlDocument Factory configuration document.
Exceptions
Type Summary
ArgumentNullException Thrown when doc is null.

LoadFactoryDocument

Loads stream into a XmlDocument applying validation to the stream against the object factory schema.

Signature:
public XmlDocument LoadFactoryDocument(stream)
Returns

An object factory configuration document.

Parameters
Name Type Summary
stream Stream Contents of the configuration document.
Exceptions
Type Summary
ContextConfigurationException Thrown when the configuration document is not valid.

LoadPackageDocument

Loads stream into a XmlDocument applying validation to the stream against the package schema.

Signature:
public XmlDocument LoadPackageDocument(stream)
Returns

A package configuration document.

Parameters
Name Type Summary
stream Stream Contents of the configuration document.
Exceptions
Type Summary
ContextConfigurationException Thrown when the configuration document is not valid.