public ItemFinishedEventArgs(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType, string error) : base(folder, item) { this.Action = action; this.ItemType = itemType; this.Error = error; }
public FileTransfer(string folderId, string path, ItemChangedItemType itemType, ItemChangedActionType actionType) { this.FolderId = folderId; this.Path = path; this.Status = FileTransferStatus.Started; this.StartedUtc = DateTime.UtcNow; this.ItemType = itemType; this.ActionType = actionType; }
public ItemStartedEventArgs(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType) : base(folder, item) { this.Action = action; this.ItemType = itemType; }
private FileTransfer FetchOrInsertInProgressFileTransfer(string folder, string path, ItemChangedItemType itemType, ItemChangedActionType actionType) { var key = new FolderPathKey(folder, path); bool created = false; FileTransfer fileTransfer; lock (this.transfersLock) { if (!this.inProgressTransfers.TryGetValue(key, out fileTransfer)) { created = true; fileTransfer = new FileTransfer(folder, path, itemType, actionType); logger.Debug("Created file transfer: {0}", fileTransfer); this.inProgressTransfers.Add(key, fileTransfer); } } if (created) { this.OnTransferStarted(fileTransfer); } return(fileTransfer); }
private void OnItemFinished(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType, string error) { var handler = this.ItemFinished; if (handler != null) handler(this, new ItemFinishedEventArgs(folder, item, action, itemType, error)); }
private void OnItemStarted(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType) { var handler = this.ItemStarted; if (handler != null) { handler(this, new ItemStartedEventArgs(folder, item, action, itemType)); } }
private void OnItemFinished(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType, string error) { this.ItemFinished?.Invoke(this, new ItemFinishedEventArgs(folder, item, action, itemType, error)); }
private void OnItemStarted(string folder, string item, ItemChangedActionType action, ItemChangedItemType itemType) { this.ItemStarted?.Invoke(this, new ItemStartedEventArgs(folder, item, action, itemType)); }