Class DataConnectorFactory
Provides a generic way to create DataConnectors.
public static class DataConnectorFactory
- Inheritance
-
DataConnectorFactory
- Inherited Members
Properties
RegisteredDataSourceNames
Gets the registered data source names.
public static IEnumerable<string> RegisteredDataSourceNames { get; }
Property Value
- IEnumerable<string>
The registered data source names.
Methods
CreateDataConnectorFromXmlNode(XmlNode)
Creates a data source from the specified XML node.
public static DataConnector CreateDataConnectorFromXmlNode(XmlNode node)
Parameters
nodeXmlNodeAn XML node containing the definition of the source.
Returns
- DataConnector
The created data source.
Exceptions
- DataException
If the type of source is unknown.
RegisterDataConnectorType(string, CreateDataSource)
Registers the specified data source type with a delegate
public static void RegisterDataConnectorType(string name, DataConnectorFactory.CreateDataSource del)
Parameters
namestringThe name
delDataConnectorFactory.CreateDataSourceThe delegate for the name
UnregisterDataConnectorType(string)
Unregisters the delegate which was registered under the specified name.
public static void UnregisterDataConnectorType(string name)
Parameters
namestringThe name which was registered.
Exceptions
- ArgumentException
If the
namehasn't been registered before