Initial
This commit is contained in:
24
files/DomainPorts.cs
Normal file
24
files/DomainPorts.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Domain
|
||||
{
|
||||
public static class DomainPorts
|
||||
{
|
||||
private static IAdapterResolver _resolver;
|
||||
|
||||
internal static T Resolve<T>()
|
||||
{
|
||||
if (_resolver == null) throw new NullReferenceException("Adapter resolver is not set!");
|
||||
return _resolver.Resolve<T>();
|
||||
}
|
||||
|
||||
public static void SetResolver(IAdapterResolver resolver)
|
||||
{
|
||||
_resolver = resolver;
|
||||
}
|
||||
|
||||
// public static ILogService LogService => Resolve<ILogService>();
|
||||
// public static IConfigService ConfigService => Resolve<IConfigService>();
|
||||
// public static ICacheService CacheService => Resolve<ICacheService>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user