/// <summary> /// Adds a single command to the list of commands to copy the dataprep folder /// to this computer /// </summary> /// <param name="sDataPrepPath">The path where the data prep will be copied to</param> /// <exception cref="ArgumentException">Thrown if the output dataprep path is empty or null</exception> public void addDataPrepSingleCommand(string sDataPrepSinglePath, bool bZip) { if (sDataPrepSinglePath.Length != 0) { DataPrepPathZip NewInfo = new DataPrepPathZip(); NewInfo.Path = sDataPrepSinglePath; NewInfo.Zip = bZip; this.sDataPrepPath.Add(NewInfo); } }
/// <summary> /// Constructor. Initializes members. This constructor sets the flag which indicates if this is the command /// to copy the dataprep folder to false. /// </summary> /// <exception cref="ArgumentException">Thrown if the command line is empty or null</exception> /// <param name="sCommand">The command line to be executed.</param> /// <param name="sWorkingDirectory">The working directory for the command to be executed.</param> /// <param name="sDescription">Command's description</param> public DeploymentCommand(DeploymentComputer SourceMachine, DataPrepPathZip sSourcePath, DataPrepPathZip sTargetPath, bool bFile, string sDescription) { // Set members this.SourceMachine = SourceMachine; this.sSourcePath = sSourcePath; this.sTargetPath = sTargetPath; this.bCopyFile = bFile; this.sDescription = sDescription; this.Type = TypeCmd.DeployCmd; }
/// <summary> /// Adds a command to the list of commands to deploy one or several files /// to this computer /// </summary> /// <param name="sDataPrepPath">The path where the data prep will be copied to</param> /// <exception cref="ArgumentException">Thrown if the output dataprep path is empty or null</exception> public void addDeployCommand(DeploymentComputer sourceMachine, string sourcePath, string sourceDest, bool bFile, string description) { DataPrepPathZip sourceInfo = new DataPrepPathZip(); sourceInfo.Path = sourcePath; DataPrepPathZip destInfo = new DataPrepPathZip(); destInfo.Path = sourceDest; // Add deploy command to list DeploymentCommand command = new DeploymentCommand(sourceMachine, sourceInfo, destInfo, bFile, description); this.lstCommands.Add(command); }