/// <summary> /// Подсчет ссылок /// </summary> /// <returns></returns> public async Task RequestUrl() { ErrorMessage = string.Empty; await RequestWrapper.AwaitAsync( cancelableAction : async token => { string htmlMessage = await mUrlRequestService.RequestUrl(Url); return(await mUrlParseService.GetReferenceCount(htmlMessage)); }, callbackAction : result => { if (mCancellationTokenSource.IsCancellationRequested) { return; } ReferenceCount = result; }, alertAction : exception => { ErrorMessage = exception.Message; }, scheduler : TaskScheduler.FromCurrentSynchronizationContext()); if (mCancellationTokenSource.IsCancellationRequested) { return; } await mMaxReferenceCountSelectDelegateInvoker(); }