Method GetInstance
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
GetInstance<TImplementation>(T1, T2, T3, T4)
Gets an instance of TImplementation using the registered factory method.
public TImplementation GetInstance<TImplementation>(T1 arg1, T2 arg2, T3 arg3, T4 arg4) where TImplementation : TBase
Parameters
arg1T1The first argument to pass to the factory method.
arg2T2The second argument to pass to the factory method.
arg3T3The third argument to pass to the factory method.
arg4T4The fourth argument to pass to the factory method.
Returns
- TImplementation
An instance of
TImplementation.
Type Parameters
TImplementationThe type of object to be created.
Exceptions
- InvalidOperationException
Thrown when no factory method is registered for the specified type.