public Task UpdateInstalledStateAsync(EngineFeatureState featureState, EngineFeatureState.States value) { if (Logger.IsEnabled(LogLevel.Debug)) { Logger.LogDebug("Feature '{FeatureName}' InstallState changed from '{FeatureState}' to '{FeatureState}'", featureState.Id, featureState.InstallState, value); } return(Task.CompletedTask); }
public async Task UpdateInstalledStateAsync(EngineFeatureState featureState, EngineFeatureState.States value) { if (Logger.IsEnabled(LogLevel.Debug)) { Logger.LogDebug("Feature '{FeatureName}' InstallState changed from '{FeatureState}' to '{FeatureState}'", featureState.Id, featureState.InstallState, value); } var previousFeatureState = await GetOrCreateFeatureStateAsync(featureState.Id); if (previousFeatureState.InstallState != featureState.InstallState) { if (Logger.IsEnabled(LogLevel.Warning)) { Logger.LogWarning("Feature '{FeatureName}' prior InstallState was '{FeatureState}' when '{FeatureState}' was expected", featureState.Id, previousFeatureState.InstallState, featureState.InstallState); } } previousFeatureState.InstallState = value; featureState.InstallState = value; UpdateEngineState(); }