{ private readonly ILoggerService _loggerService; public ExceptionHandler(ILoggerService loggerService) { _loggerService = loggerService; } ... ! Як використовували var databaseService = new DatabaseService("connectionString") var logger = new LoggerService(databaseService); var exceptionHandler = new ExceptionHandler(logger) ;
{ [Dependency] public ILoggerService LoggerService { get; set; } public ExceptionHandler() { } ... ! Як використовувати var unityContainer = CreateContainer(); .. ! var exceptionHandler = unityContainer.Resolve<IExceptionHandler>();