using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DTS.Common.Interface.DASFactory; using DTS.Common.Interface.StatusAndProgressBar; namespace DTS.DASLib.Service.StateMachine { public class DownloadParameters : IStatusParameters { #region general parameters /// /// controls whether we should remain in state or not /// public bool ProceedWhenDone { get; set; } = false; /// /// whether all das are required to finish their download /// public bool RequireAllDASFinish { get; set; } = false; #endregion #region config file parameters /// /// holds the Download Folder setting from our config file /// public string DefaultDownloadFolder { get; set; } = string.Empty; /// /// holds the upload binaries setting from our config file /// public bool DefaultUploadBinaries { get; set; } = false; /// /// holds the upload exports setting from our config file /// public bool DefaultUploadExports { get; set; } = false; /// /// holds the upload logs setting from our config file /// public bool DefaultUploadLogs { get; set; } = false; /// /// holds the upload reports setting from our config file /// public bool DefaultUploadReports { get; set; } = false; /// /// holds the upload test setups setting from our config file /// public bool DefaultUploadSetups { get; set; } = false; #endregion #region download function parameters /// /// defines an array of DAS which should be downloaded from /// public IDASCommunication[] DASList { get; set; } = new IDASCommunication[0]; /// /// holds the test id of our current test /// public string CurrentTestTestId { get; set; } = string.Empty; /// /// holds the test id node of our current test /// public string CurrentTestTestIdNode { get; set; } = string.Empty; /// /// holds the test directory location of our current test /// public string CurrentTestTestDirectory { get; set; } = string.Empty; /// /// holds the original test directory location of our current test /// public string CurrentTestOriginalTestDirectory { get; set; } = string.Empty; /// /// holds whether we're in ROI mode or not /// public bool ROI { get; set; } = false; /// /// holds whether we're in Recovery mode or not /// public bool Recovery { get; set; } = false; /// /// Used to prevent unnecessarily re-copying the folders in the Test Id folder /// (DASConfigs, SETUP, etc.) when running from the Download tile. /// public bool FoldersCopied { get; set; } #endregion public ErrorCallback ErrorCallback { get; set; } /// /// resets all parameters back to defaults /// public void Reset() { DASList = new IDASCommunication[0]; CurrentTestTestId = string.Empty; CurrentTestTestIdNode = string.Empty; DefaultDownloadFolder = string.Empty; DefaultUploadBinaries = false; DefaultUploadExports = false; DefaultUploadLogs = false; DefaultUploadReports = false; DefaultUploadSetups = false; ErrorCallback = null; Recovery = false; ROI = false; } public override string ToString() { var sb = new StringBuilder(); return sb.ToString(); } } }