Class GorgonGamingDeviceDriverFactory
A factory used to load gaming device drivers.
Implements
Inherited Members
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public sealed class GorgonGamingDeviceDriverFactory : IGorgonGamingDeviceDriverFactory
Constructors
| Edit this page View SourceGorgonGamingDeviceDriverFactory(GorgonMefPlugInCache, IGorgonLog)
Initializes a new instance of the GorgonGamingDeviceDriverFactory class.
Declaration
public GorgonGamingDeviceDriverFactory(GorgonMefPlugInCache pluginCache, IGorgonLog log = null)
Parameters
Type | Name | Description |
---|---|---|
GorgonMefPlugInCache | pluginCache | The plug in cache that will hold the plug in assemblies. |
IGorgonLog | log | [Optional] The logger used for debugging. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
Methods
| Edit this page View SourceLoadAllDrivers(string)
Function to load all drivers from the plug in assemblies that are currently loaded.
Declaration
public IReadOnlyList<IGorgonGamingDeviceDriver> LoadAllDrivers(string assemblyPath)
Parameters
Type | Name | Description |
---|---|---|
string | assemblyPath | The path to the assembly containing the gaming driver plug ins. |
Returns
Type | Description |
---|---|
IReadOnlyList<IGorgonGamingDeviceDriver> | A read only list containing an instance of each driver. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
ArgumentException | Thrown when the |
LoadDriver(string, string)
Function to load a gaming device driver from any loaded plug in assembly.
Declaration
public IGorgonGamingDeviceDriver LoadDriver(string assemblyPath, string driverType)
Parameters
Type | Name | Description |
---|---|---|
string | assemblyPath | The path to the assembly containing the gaming driver plug ins. |
string | driverType | The fully qualified type name of the driver to load. |
Returns
Type | Description |
---|---|
IGorgonGamingDeviceDriver | The gaming device driver plug in. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
ArgumentException | Thrown when the driver type name specified by -or- Thrown when the |