public void RegisterExtension(IIronstoneExtensionApplication extension) { if (_uiCreated) { _logger.Entry("Extensions registration attempted after UI has been loaded", Severity.Error); return; } _logger.Entry($"{extension.GetType().ToString()} registration started", Severity.Debug); DataService.Current.InvalidateStoreTypes(); try { extension.InjectContainer(_current.Container); _extensions.Add(extension); _logger.Entry($"{extension.GetType().ToString()} registration completed", Severity.Debug); } catch (System.Exception e) { _logger.Entry($"{extension.GetType().ToString()} registration failed", Severity.Error); _logger.LogException(e); } }
public void RegisterExtension(IIronstoneExtensionApplication extension) { if (_uiCreated) { _logger.LogCritical("Extensions registration attempted after UI has been loaded"); return; } _logger.LogDebug($"{extension.GetType().ToString()} registration started"); try { //extension.InjectContainer(_current.Container); extension.RegisterServices(serviceCollection); _extensions.Add(extension); _logger.LogInformation($"{extension.GetType().ToString()} registration completed"); } catch (System.Exception e) { _logger.LogError(e, $"{extension.GetType().ToString()} registration failed"); } }