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
arg1
T1The first argument to pass to the factory method.
arg2
T2The second argument to pass to the factory method.
arg3
T3The third argument to pass to the factory method.
arg4
T4The fourth argument to pass to the factory method.
Returns
- TImplementation
An instance of
TImplementation
.
Type Parameters
TImplementation
The type of object to be created.
Exceptions
- InvalidOperationException
Thrown when no factory method is registered for the specified type.