using System; namespace Domain { public static class DomainPorts { private static IAdapterResolver _resolver; internal static T Resolve() { if (_resolver == null) throw new NullReferenceException("Adapter resolver is not set!"); return _resolver.Resolve(); } public static void SetResolver(IAdapterResolver resolver) { _resolver = resolver; } // public static ILogService LogService => Resolve(); // public static IConfigService ConfigService => Resolve(); // public static ICacheService CacheService => Resolve(); } }