Class ServiceLocator<TContract, TSelf>
Inheritance
ServiceLocator<TContract, TSelf>
Assembly: DotNetNuke.dll
Syntax
public abstract class ServiceLocator<TContract, TSelf> where TSelf : ServiceLocator<TContract, TSelf>, new()
Type Parameters
| Name |
Description |
| TContract |
|
| TSelf |
|
Constructors
ServiceLocator()
Declaration
protected ServiceLocator()
Properties
Factory
Declaration
protected static Func<TContract> Factory { get; set; }
Property Value
| Type |
Description |
| Func<TContract> |
|
Instance
Declaration
public static TContract Instance { get; }
Property Value
| Type |
Description |
| TContract |
|
Methods
ClearInstance()
Declaration
public static void ClearInstance()
GetFactory()
Declaration
protected abstract Func<TContract> GetFactory()
Returns
| Type |
Description |
| Func<TContract> |
|
SetTestableInstance(TContract)
Declaration
public static void SetTestableInstance(TContract instance)
Parameters
| Type |
Name |
Description |
| TContract |
instance |
|
Extension Methods