public ExcelOutput(IEventAggregator eventAggregator = null, ILogger logger = null) { _eventAggregator = eventAggregator; _logger = logger; if (_eventAggregator.IsNullObj()) { _eventAggregator = EventAggregator.Empty; } _eventAggregator.SubsribeEvent(this); if (_logger.IsNullObj()) { _logger = new FakeLogger(); } Assembly assembly = Assembly.LoadFrom("Metaproject.Excel.dll"); Type type = assembly.GetType("Metaproject.Excel.ExcelApp"); _app = (IExcelApp)Activator.CreateInstance(type); _app.AttachAggregator(_eventAggregator, _logger); }