public FeaturesController( IEditableFeatureFlagStorageService storage, IFeatureFlagCacheService cache, IAppConfiguration config) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _config = config ?? throw new ArgumentNullException(nameof(config)); }
private static void StartFeatureFlags(IFeatureFlagCacheService featureFlags) { // Try to load the feature flags once at startup. try { featureFlags.RefreshAsync().Wait(); } catch (Exception) { } // Continuously refresh the feature flags in the background. HostingEnvironment.QueueBackgroundWorkItem(featureFlags.RunAsync); }
public FeatureFlagClient(IFeatureFlagCacheService cache, ILogger <FeatureFlagClient> logger) { _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }