Class WMDataSourceFactory
Factory class for dynamically creating new instances of IWMDataSource
Inherited Members
Namespace: Quantellia.WMServer.Asset.DataBinding
Assembly: WMServer.dll
Syntax
public static class WMDataSourceFactory
Methods
Create(string, string?)
Create a new instance of the specified type, if it exists, otherwise throws an exception. Will register all available data source types prior to instance creation, if necessary.
Declaration
public static IWMDataSource Create(string type, string? accessString = null)
Parameters
Type | Name | Description |
---|---|---|
string | type | The name that was used to register the type in RegisterWMDataSourceType(string, Type) |
string | accessString | Optional string to specify connection or other access information for the data source. |
Returns
Type | Description |
---|---|
IWMDataSource |
RegisterDataSources()
Registers all currently offered data source types on its first call. Subsequent calls to RegisterDataSources() does nothing.
Declaration
public static void RegisterDataSources()
RegisterWMDataSourceType(string, Type)
Registers a dataSource type to an associated key.
Declaration
public static void RegisterWMDataSourceType(string nameKey, Type type)
Parameters
Type | Name | Description |
---|---|---|
string | nameKey | The name used to register the type |
Type | type | The type being registered. This must implement the IWMDataSource interface. |
Remarks
If the registered nameKey already exists, it will be replaced by the type and value specified in this call.
RegisteredTypeExists(string)
Returns whether the specified registered type
exists.
Will register all available data source types, if necessary.
Declaration
public static bool RegisteredTypeExists(string type)
Parameters
Type | Name | Description |
---|---|---|
string | type |
Returns
Type | Description |
---|---|
bool |