Start() public method

Start the BackgroundHttpRequester with a given upload interval and a list of previously unrequested URIs.
public Start ( System.TimeSpan uploadInterval, IEnumerable previouslyUnrequested = null ) : void
uploadInterval System.TimeSpan How often to send the contents of the queue.
previouslyUnrequested IEnumerable List of previously unrequested URIs obtained last time the requester was stopped.
return void
コード例 #1
0
 /// <summary>
 /// Start the requester with any unsent URIs from the last application run.
 /// </summary>
 /// <param name="uploadInterval">How often to send URIs to analytics.</param>
 /// <returns>Task that completes when the requester is ready.</returns>
 private static async Task StartRequesterAsync(TimeSpan uploadInterval)
 {
     requester = new BackgroundHttpRequester(PreprocessHttpRequest);
     var previousRequests = await LocalFolderContractSerializer<List<Uri>>.RestoreAsync(RequestQueueFileName);
     requester.Start(uploadInterval, previousRequests);
 }