protected override void OnNavigatedTo(NavigationEventArgs e) { HttpBaseProtocolFilter baseProtocolFilter = new HttpBaseProtocolFilter(); meteredConnectionFilter = new HttpMeteredConnectionFilter(baseProtocolFilter); httpClient = new HttpClient(meteredConnectionFilter); cts = new CancellationTokenSource(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { HttpBaseProtocolFilter baseProtocolFilter = new HttpBaseProtocolFilter(); meteredConnectionFilter = new HttpMeteredConnectionFilter(baseProtocolFilter); httpClient = new HttpClient(meteredConnectionFilter); cts = new CancellationTokenSource(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested; HttpBaseProtocolFilter baseProtocolFilter = new HttpBaseProtocolFilter(); meteredConnectionFilter = new HttpMeteredConnectionFilter(baseProtocolFilter); httpClient = new HttpClient(meteredConnectionFilter); cts = new CancellationTokenSource(); }
public MeteredConnectionFilterSettings(HttpMeteredConnectionFilter meteredConnectionFilter) { if (meteredConnectionFilter == null) { throw new ArgumentNullException("meteredConnectionFilter"); } this.InitializeComponent(); this.meteredConnectionFilter = meteredConnectionFilter; OptInSwitch.IsOn = meteredConnectionFilter.OptIn; }
public MeteredConnectionFilterSettings(HttpMeteredConnectionFilter meteredConnectionFilter) { if (meteredConnectionFilter == null) { throw new ArgumentNullException("meteredConnectionFilter"); } this.InitializeComponent(); this.meteredConnectionFilter = meteredConnectionFilter; OptInSwitch.IsOn = meteredConnectionFilter.OptIn; }
public void Dispose() { if (meteredConnectionFilter != null) { meteredConnectionFilter.Dispose(); meteredConnectionFilter = null; } if (httpClient != null) { httpClient.Dispose(); httpClient = null; } if (cts != null) { cts.Dispose(); cts = null; } }
public void Dispose() { if (meteredConnectionFilter != null) { meteredConnectionFilter.Dispose(); meteredConnectionFilter = null; } if (httpClient != null) { httpClient.Dispose(); httpClient = null; } if (cts != null) { cts.Dispose(); cts = null; } }