Gorgon
Show / Hide Table of Contents

Class GorgonGamingDeviceDriverFactory

A factory used to load gaming device drivers.

Inheritance
object
GorgonGamingDeviceDriverFactory
Implements
IGorgonGamingDeviceDriverFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public sealed class GorgonGamingDeviceDriverFactory : IGorgonGamingDeviceDriverFactory

Constructors

| Edit this page View Source

GorgonGamingDeviceDriverFactory(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 pluginCache is null.

Methods

| Edit this page View Source

LoadAllDrivers(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 assemblyPath parameter is null

ArgumentEmptyException

Thrown when the assemblyPath parameter is empty.

ArgumentException

Thrown when the assemblyPath was invalid.

| Edit this page View Source

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 assemblyPath, or the driverType parameter is null

ArgumentEmptyException

Thrown when the assemblyPath, or the driverType parameter is empty.

ArgumentException

Thrown when the driver type name specified by driverType was not found in any of the loaded plug in assemblies.

-or-

Thrown when the assemblyPath was invalid.

Implements

IGorgonGamingDeviceDriverFactory

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author