public ToggleClient(Configuration configuration) { Logger.Info($"Toggle Client: Initialised with SdkKey"); CancellationToken = cancellationTokenSource.Token; _configuration = configuration; _featureToggleStore = new InMemoryFeatureToggleStore(); var featureRequestor = new FeatureRequestor(configuration); var fetchTogglesTask = new FetchAllFeatureTogglesTask(_featureToggleStore, featureRequestor, configuration.PollingInterval); _taskScheduler = new ElapsedTimerScheduledTaskManager(); _taskScheduler.Configure(_configuration, new List <IToggleScheduledTask>() { fetchTogglesTask }, CancellationToken); }
public FetchAllFeatureTogglesTask(IFeatureToggleStore featureToggleStore, IFeatureRequestor featureRequestor, TimeSpan interval) { _featureToggleStore = featureToggleStore; _featureRequestor = featureRequestor; Interval = interval; }