private void HandleAppSetting(AppSettingRegistrationRequest @event) { if (_appSettings.Any(x => x.Key == @event.Key && x.Value != @event.Value)) { // Throw exception? return; } _appSettings.Add(@event); }
private void HandleAppSetting(AppSettingRegistrationRequest @event) { if (Model.RuntimeEnvironment?.Name != @event.RuntimeEnvironment) { return; } if (!string.IsNullOrWhiteSpace(@event.ForProjectWithRole) && !OutputTarget.GetProject().HasRole(@event.ForProjectWithRole)) { return; } @event.MarkHandled(); if (_appSettings.Any(x => x.Key == @event.Key && x.Value != @event.Value)) { return; } _appSettings.Add(@event); }