{
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- private Agent<CloudAction> _agent;
+ //private Agent<CloudAction> _agent;
[System.ComponentModel.Composition.Import]
public DeleteAgent DeleteAgent { get; set; }
//Essentially it stops the poll agent to give priority to the network agent
//Initially the event is signalled because we don't need to pause
private readonly AsyncManualResetEvent _proceedEvent = new AsyncManualResetEvent(true);
- private Agents.Selectives _selectives;
private bool _pause;
public AsyncManualResetEvent ProceedEvent
}
- public void Start()
+ /*public void Start()
{
if (_agent != null)
return;
loop();
});
- }
+ }*/
+/*
private async Task Process(CloudAction action)
{
if (action == null)
Log.WarnFormat("[REQUEUE] {0} : {1} -> {2}", action.Action, action.LocalFile, action.CloudFile);
}
}
-*/
+#1#
catch (OperationCanceledException ex)
{
Log.WarnFormat("Cancelling [{0}]",ex);
}
}
}
+*/
- private void ProcessChildUploads(CloudUploadAction uploadAction)
+ /* private void ProcessChildUploads(CloudUploadAction uploadAction)
{
if (!uploadAction.IsCreation || !(uploadAction.LocalFile is DirectoryInfo))
return;
folderActions.ApplyAction(PostUploadAction);
fileActions.ApplyAction(PostUploadAction);
}
-
+*/
+/*
private void PostUploadAction(CloudUploadAction action)
{
var state = StatusKeeper.GetStateByFilePath(action.LocalFile.FullName);
action.FileState = state;
Post(action);
}
+*/
- private CancellationToken CurrentOperationCancelToken
+ public CancellationToken CurrentOperationCancelToken
{
get { return _currentOperationCancellation.Token; }
}
}
}
- private async Task SyncFiles(AccountInfo accountInfo,CloudAction action)
+/* private async Task SyncFiles(AccountInfo accountInfo,CloudAction action)
{
if (accountInfo == null)
throw new ArgumentNullException("accountInfo");
var cloudFile = action.CloudFile;
var downloadPath = action.LocalFile.GetProperCapitalization();
- var cloudHash = cloudFile.Hash.ToLower();
+ var cloudHash = cloudFile.X_Object_Hash.ToLower();
var previousCloudHash = cloudFile.PreviousHash == null?null: cloudFile.PreviousHash.ToLower();
var localHash = action.TreeHash.Value.TopHash.ToHashString();// LocalHash.Value.ToLower();
//var topHash = action.TopHash.Value.ToLower();
// If the previous tophash matches the local tophash, the file was only changed on the server.
if (localHash == previousCloudHash)
{
- await Downloader.DownloadCloudFile(accountInfo, cloudFile, downloadPath, CurrentOperationCancelToken);
+ await Downloader.DownloadCloudFile(accountInfo, cloudFile, downloadPath CurrentOperationCancelToken);
}
else
{
ReportConflictForMismatch(downloadPath);
}
}
- }
+ }*/
private void ReportConflictForMismatch(string downloadPath)
{
StatusNotification.NotifyChange(message, TraceLevel.Warning);
}
+/*
public void Post(CloudAction cloudAction)
{
if (cloudAction == null)
else
_agent.Post(cloudAction);
}
+*/
+/*
public IEnumerable<CloudAction> GetEnumerable()
{
return _agent.GetEnumerable();
}
+*/
public Task GetDeleteAwaiter()
{
return DeleteAgent.ProceedEvent.WaitAsync();
}
+/*
public CancellationToken CancellationToken
{
get { return _agent.CancellationToken; }
}
+*/
public bool Pause
{