Пример #1
0
        /// <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);
        }
Пример #2
0
 /// <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));
 }
Пример #3
0
 /// <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));
 }