PerformAsync() публичный абстрактный Метод

public abstract PerformAsync ( string destination ) : Task
destination string
Результат Task
		private async Task<SynchronizationReport> PerformSynchronizationAsync(string destinationUrl,
		                                                                      SynchronizationWorkItem work)
		{
			Log.Debug("Starting to perform {0} for a file '{1}' and a destination server {2}", work.GetType().Name, work.FileName,
			          destinationUrl);

			if (!CanSynchronizeTo(destinationUrl))
			{
				Log.Debug("The limit of active synchronizations to {0} server has been achieved. Cannot process a file '{1}'.",
				          destinationUrl, work.FileName);

				synchronizationQueue.EnqueueSynchronization(destinationUrl, work);

				return new SynchronizationReport(work.FileName, work.FileETag, work.SynchronizationType)
					{
						Exception = new SynchronizationException(string.Format(
							"The limit of active synchronizations to {0} server has been achieved. Cannot process a file '{1}'.",
							destinationUrl, work.FileName))
					};
			}

			string fileName = work.FileName;
			synchronizationQueue.SynchronizationStarted(work, destinationUrl);
			publisher.Publish(new SynchronizationUpdate
				{
					FileName = work.FileName,
					DestinationServer = destinationUrl,
					SourceServerId = storage.Id,
					SourceServerUrl = ServerUrl,
					Type = work.SynchronizationType,
					Action = SynchronizationAction.Start,
					SynchronizationDirection = SynchronizationDirection.Outgoing
				});

			SynchronizationReport report;

			try
			{
				report = await work.PerformAsync(destinationUrl);
			}
			catch (Exception ex)
			{
				report = new SynchronizationReport(work.FileName, work.FileETag, work.SynchronizationType)
					{
						Exception = ex,
					};
			}

			var synchronizationCancelled = false;

			if (report.Exception == null)
			{
				var moreDetails = string.Empty;

				if (work.SynchronizationType == SynchronizationType.ContentUpdate)
				{
					moreDetails = string.Format(". {0} bytes were transfered and {1} bytes copied. Need list length was {2}",
					                            report.BytesTransfered, report.BytesCopied, report.NeedListLength);
				}

				Log.Debug("{0} to {1} has finished successfully{2}", work.ToString(), destinationUrl, moreDetails);
			}
			else
			{
				if (work.IsCancelled || report.Exception is TaskCanceledException)
				{
					synchronizationCancelled = true;
					Log.DebugException(string.Format("{0} to {1} was cancelled", work, destinationUrl), report.Exception);
				}
				else
				{
					Log.WarnException(string.Format("{0} to {1} has finished with the exception", work, destinationUrl),
					                  report.Exception);
				}
			}

			Queue.SynchronizationFinished(work, destinationUrl);

			if (!synchronizationCancelled)
				CreateSyncingConfiguration(fileName, work.FileETag, destinationUrl, work.SynchronizationType);

			publisher.Publish(new SynchronizationUpdate
				{
					FileName = work.FileName,
					DestinationServer = destinationUrl,
					SourceServerId = storage.Id,
					SourceServerUrl = ServerUrl,
					Type = work.SynchronizationType,
					Action = SynchronizationAction.Finish,
					SynchronizationDirection = SynchronizationDirection.Outgoing
				});

			return report;
		}