using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using Pithos.Interfaces; using Pithos.Network; namespace Pithos.Core { public class WorkflowState { public AccountInfo AccountInfo { get; set; } public string Path { get; set; } public string FileName { get; set; } public string OldPath { get; set; } public string OldFileName{ get; set; } public WatcherChangeTypes TriggeringChange { get; set; } public FileStatus Status { get; set; } public bool Skip { get; set; } public string Hash { get; set; } public string LastUpdateHash { get; set; } /* public WorkflowState(AccountInfo accountInfo) { AccountInfo = accountInfo; } */ public WorkflowState() { } public WorkflowState(AccountInfo accountInfo, FileState state) { AccountInfo = accountInfo; Path = state.FilePath.ToLower(); FileName = System.IO.Path.GetFileName(state.FilePath).ToLower(); Hash = state.Checksum; Status = state.OverlayStatus == FileOverlayStatus.Unversioned ? FileStatus.Created : state.FileStatus; TriggeringChange = state.OverlayStatus == FileOverlayStatus.Unversioned ? WatcherChangeTypes.Created : WatcherChangeTypes.Changed; } } }