using System; using System.Collections.Generic; using System.Text; using System.IO; namespace SL_Switcher { public class FileOperation { //private string m_source_path; private string m_dest_root; private string m_name; public FileOperation(string dstroot, string filename) { this.DestinationRoot = dstroot; this.Filename = filename; } /// /// Executes the operation /// public virtual void Execute() { } /// /// Full destination path with filename /// public string Destination { get { return Path.Combine(m_dest_root, m_name); } } /// /// Filename with relative path /// public string Filename { get { return m_name; } set { m_name = value;} } /// /// Root of the destination /// public string DestinationRoot { get { return m_dest_root; } set { m_dest_root = value; } } /// /// How much this item counts towards the total progress /// public virtual int ProgressValue { get{ return 1; } } /// /// Determines whether the action is needed /// /// True if needed public virtual bool ActionNeeded() { return true; } } }