/// <summary> /// Start the requester with any unsent URIs from the last application run. /// </summary> /// <returns>Task that completes when the requester is ready.</returns> private static async Task StartRequesterAsync() { requester = new BackgroundHttpClientRequester(PreprocessHttpRequest, IsInternetAvailable); var previousRequests = await LocalFolderContractSerializer <List <Uri> > .RestoreAsync(RequestQueueFileName); requester.Start(lastUploadInterval, previousRequests); }
/// <summary> /// Load the session state from storage if it exists, null if it does not. /// </summary> /// <returns>Task that completes when the SessionState is available.</returns> protected override async Task <T> Load <T>(string name) { return(await LocalFolderContractSerializer <T> .RestoreAsync(name)); }
/// <summary> /// Load the session state from storage if it exists, null if it does not. /// </summary> /// <returns>Task that completes when the SessionState is available.</returns> private static async Task <SessionState> LoadSessionState() { return(await LocalFolderContractSerializer <SessionState> .RestoreAsync(SessionStateFileName)); }