117 lines
4.2 KiB
C#
117 lines
4.2 KiB
C#
|
|
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
|
|||
|
|
/// <summary>
|
|||
|
|
/// controls whether we should remain in state or not
|
|||
|
|
/// </summary>
|
|||
|
|
public bool ProceedWhenDone { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// whether all das are required to finish their download
|
|||
|
|
/// </summary>
|
|||
|
|
public bool RequireAllDASFinish { get; set; } = false;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region config file parameters
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the Download Folder setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public string DefaultDownloadFolder { get; set; } = string.Empty;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the upload binaries setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public bool DefaultUploadBinaries { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the upload exports setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public bool DefaultUploadExports { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the upload logs setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public bool DefaultUploadLogs { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the upload reports setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public bool DefaultUploadReports { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the upload test setups setting from our config file
|
|||
|
|
/// </summary>
|
|||
|
|
public bool DefaultUploadSetups { get; set; } = false;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region download function parameters
|
|||
|
|
/// <summary>
|
|||
|
|
/// defines an array of DAS which should be downloaded from
|
|||
|
|
/// </summary>
|
|||
|
|
public IDASCommunication[] DASList { get; set; } = new IDASCommunication[0];
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the test id of our current test
|
|||
|
|
/// </summary>
|
|||
|
|
public string CurrentTestTestId { get; set; } = string.Empty;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the test id node of our current test
|
|||
|
|
/// </summary>
|
|||
|
|
public string CurrentTestTestIdNode { get; set; } = string.Empty;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the test directory location of our current test
|
|||
|
|
/// </summary>
|
|||
|
|
public string CurrentTestTestDirectory { get; set; } = string.Empty;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds the original test directory location of our current test
|
|||
|
|
/// </summary>
|
|||
|
|
public string CurrentTestOriginalTestDirectory { get; set; } = string.Empty;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds whether we're in ROI mode or not
|
|||
|
|
/// </summary>
|
|||
|
|
public bool ROI { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// holds whether we're in Recovery mode or not
|
|||
|
|
/// </summary>
|
|||
|
|
public bool Recovery { get; set; } = false;
|
|||
|
|
/// <summary>
|
|||
|
|
/// Used to prevent unnecessarily re-copying the folders in the Test Id folder
|
|||
|
|
/// (DASConfigs, SETUP, etc.) when running from the Download tile.
|
|||
|
|
/// </summary>
|
|||
|
|
public bool FoldersCopied { get; set; }
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
public ErrorCallback ErrorCallback { get; set; }
|
|||
|
|
/// <summary>
|
|||
|
|
/// resets all parameters back to defaults
|
|||
|
|
/// </summary>
|
|||
|
|
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();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|