private static void OnScopeOpened(object sender, DryIocEventArgs e) { var eventArgs = new ExcelEventArgs(e.Container); OnScopeOpenedEvent?.Invoke( sender: sender, e: eventArgs); }
private void OnScopeInitialized(object sender, ExcelEventArgs e) { if (e.Container != ExcelProvider.Container) { throw new ApplicationException($"{ExcelProvider.Container} and {e.Container} must be equal."); } var test1 = ExcelProvider.Container.Resolve <IExampleClass>(); var test2 = e.Container.Resolve <IExampleClass>(); if (test1 != test2) { throw new ApplicationException($"{test1} and {test2} must be equal."); } }
private void OnScopeOpened(object sender, ExcelEventArgs e) { var test1 = ExcelProvider.Container.Resolve <IExampleClass>(); var test2 = e.Container.Resolve <IExampleClass>(); }