Class InjectorLocator
- Namespace
- Switchboard
- Assembly
- Switchboard.InjectorLocator.dll
A static service locator that provides an IInjector.
public static class InjectorLocator
- Inheritance
-
InjectorLocator
Methods
AssignLocatorDelegate(Func<IInjector>)
Assigns the delegate that provides the IInjector instance.
public static void AssignLocatorDelegate(Func<IInjector> locatorDelegate)
Parameters
Exceptions
- ArgumentNullException
Thrown if the
locatorDelegate
is null.- InvalidOperationException
Thrown if the locator delegate is already assigned.
GetInjector()
Provides an IInjector by invoking the locator delegate.
public static IInjector GetInjector()
Returns
RemoveLocatorDelegate(Func<IInjector>)
Removes the current IInjector locator delegate if it matches the locatorDelegate
argument.
public static void RemoveLocatorDelegate(Func<IInjector> locatorDelegate)
Parameters
Exceptions
- ArgumentNullException
Thrown if the
locatorDelegate
is null.