Ejemplo n.º 1
0
 /// <summary>
 /// Appends common attributes to the attribute documentation
 /// </summary>
 /// <param name="documentation">Specific attribute documentation object</param>
 /// <param name="baseTag">Base tag of the Sub-Task</param>
 /// <param name="type">Type of the task as string</param>
 public void AppendCommonAttributes(ref Documentation documentation, string baseTag, string type)
 {
     documentation.AddTuple("name [1]", "The first name attribute is a informal identifier for the Task. It is part of the <task> tag (root tag) and mandatory.");
     documentation.AddTuple("type", "The type attribute is a the identifier for the Task type. It is part of the <task> tag (root tag) and mandatory. For this Task-Type the valid value is '" + type + "'.");
     documentation.AddTuple("name [2]", "The second name attribute is a informal identifier for the Sub-Task. It is part of the " + baseTag + " tag and mandatory. ");
     documentation.AddTuple("useParam", "The useParam attribute indicates whether a global parameter is used instead of the main value of the config file. In this case, the <mainValue> tag contains the parameter name and not the actual value. It is part of the " + baseTag + " tag and mandatory. Valid values are 'true' and 'false' (default).");
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Meta Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "The loaded task was executed successfully");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The task could not be loaded and / or executed due to an unknown reason");
            return(codes);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Appends the common tags to the tag documentation
 /// </summary>
 /// <param name="documentation">Specific tag documentation object</param>
 /// <param name="baseTag">Base tag of the Sub-Task</param>
 public void AppendCommonTags(ref Documentation documentation, string baseTag)
 {
     documentation.AddTuple("task", "The <task> tag is the root tag of the Task.");
     documentation.AddTuple("items", "The <items> tag is the container tag for all Sub-Tasks.");
     documentation.AddTuple("<description> [1]", "The outer <description> tag is an informal tag for the description of the task", true);
     documentation.AddTuple("arguments", "The <arguments> tag is the container tag for all arguments within the " + baseTag + " tag.");
     documentation.AddTuple("<description> [2]", "The inner <description> tag is an informal tag for the description of the Sub-Task ", true);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns the documentation of the XML attributes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetAttributesDocumentationParameters()
        {
            Documentation attributes = new Documentation("Delete Registry-Key (Value) Task", "Attributes", "The following attributes are defined");

            this.AppendCommonAttributes(ref attributes, "<deleteRegKeyItem>", "DeleteRegKey");
            attributes.AddTuple("hive", "Indicates which registry hive is accessed. Valid values are 'HKLM', 'HKCU', 'HKCR', 'HKCC', 'HKU' and 'HKPD'. The attribute is part of the <deleteRegKeyItem> tag.");
            attributes.AddTuple("argumentIsParamName", "Indicates whether the arguments are the parameter names (of global parameters) and not the actual values. Valid values of the parameter are 'true' and 'false'. The attribute is part of the <deleteRegKeyItem> tag and is optional.");
            return(attributes);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns the documentation of the XML attributes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetAttributesDocumentationParameters()
        {
            Documentation attributes = new Documentation("Start Program Task", "Attributes", "The following attributes are defined");

            this.AppendCommonAttributes(ref attributes, "<startProgramItem>", "StartProgram");
            attributes.AddTuple("runAsynchronous", "Indicates whether the Sub-Tasks are executed synchronous (all programs are started at the same time) or asynchronous (programs are started sequentially). Valid values are 'true' and 'false'. The attribute is part of the <startProgramItem> tag.");
            attributes.AddTuple("argumentIsParamName", "Indicates whether the arguments are the parameter names (of global parameters) and not the actual values. Valid values of the parameter are 'true' and 'false'. The attribute is part of the <startProgramItem> tag and is optional.");
            return(attributes);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Returns the documentation of the XML tags for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetTagDocumentationParameters()
        {
            Documentation tags = new Documentation("Meta Task", "Tags", "The following specific tags are defined (see also the demo files or the example configuration)");

            this.AppendCommonTags(ref tags, "<metaTaskItem>");
            tags.AddTuple("metaTaskItem", "Main tag of a Sub-Task within the <items> tag");
            tags.AddTuple("mainValue", "Defines the full path to the config file to be loaded and executed by TaskRunner");
            return(tags);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Returns the documentation of the XML attributes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetAttributesDocumentationParameters()
        {
            Documentation attributes = new Documentation("Write Log Task", "Attributes", "The following attributes are defined");

            this.AppendCommonAttributes(ref attributes, "<writeLogItem>", "WriteLog");
            attributes.AddTuple("createFolders", "Indicates whether a missing folder structure will be created when writing a log entry to a new file. Valid values are 'true' and 'false'. The attribute is part of the <writeLogItem> tag and is optional.");
            attributes.AddTuple("argumentIsParamName", "Indicates whether the arguments are the parameter names (of global parameters) and not the actual values. Valid values of the parameter are 'true' and 'false'. The attribute is part of the <writeLogItem> tag and is optional.");
            return(attributes);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Returns the documentation of the XML tags for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetTagDocumentationParameters()
        {
            Documentation tags = new Documentation("Start Program Task", "Tags", "The following specific tags are defined (see also the demo files or the example configuration)");

            this.AppendCommonTags(ref tags, "<startProgramItem>");
            tags.AddTuple("startProgramItem", "Main tag of a Sub-Task within the <items> tag.");
            tags.AddTuple("mainValue", "Defines full path to the program to start.");
            tags.AddTuple("argument", "Each <argument> tag within the <arguments> tag contains one (optional) program argument. If the argumentIsParamName attribute is set to true, each argument is a global parameter name instead of the actual value. In this case, the value will be resolved at runtime ");
            return(tags);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Delete File Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "The file was deleted successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x02), "The file does not exist. Nothing to do");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The file could not be deleted due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "No file to delete was defined");
            return(codes);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Returns the documentation of the XML tags for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetTagDocumentationParameters()
        {
            Documentation tags = new Documentation("Delete Registry-Key (Value) Task", "Tags", "The following specific tags are defined (see also the demo files or the example configuration)");

            this.AppendCommonTags(ref tags, "<deleteRegKeyItem>");
            tags.AddTuple("deleteRegKeyItem", "Main tag of a Sub-Task within the <items> tag");
            tags.AddTuple("mainValue", "Defines the path to the registry key without the hive");
            tags.AddTuple("argument", "Each <argument> tag within the <arguments> tag contains one value to delete within the key. If the argumentIsParamName attribute is set to true, each argument is a global parameter name instead of the actual value. In this case, the value will be resolved at runtime");
            return(tags);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Returns the documentation of the XML tags for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetTagDocumentationParameters()
        {
            Documentation tags = new Documentation("Control Service Task", "Tags", "The following specific tags are defined (see also the demo files or the example configuration)");

            this.AppendCommonTags(ref tags, "<controlServiceItem>");
            tags.AddTuple("controlServiceItem", "Main tag of a Sub-Task within the <items> tag");
            tags.AddTuple("mainValue", "Defines the name of the service");
            tags.AddTuple("argument", "The optional <argument> tag within the <arguments> tag contains the name of the remote machine if applicable.  If the argumentIsParamName attribute is set to true, each argument is a global parameter name instead of the actual value. In this case, the value will be resolved at runtime");
            return(tags);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Returns the static prolog of status codes as documentation
        /// </summary>
        /// <param name="title">Title to display</param>
        /// <param name="subtitle">Subtitle to display</param>
        /// <returns>Formatted document</returns>
        public Documentation GetStatusCodeProlog(string title, string subtitle)
        {
            Documentation doc = new Documentation(title, subtitle, "The Status Code (byte 4 of the Execution Code) is part of the whole Execution Code. The Execution Code consists of:");

            doc.AddTuple("[byte 1]", "Execution Mode");
            doc.AddTuple("[byte 2]", "Task Type");
            doc.AddTuple("[byte 3]", "Status of the Execution");
            doc.AddTuple("[byte 4]", "Status Code");
            doc.Suffix = "Following Status Codes are defined for the Status (byte 3 of the Execution Code) '01' [Success] and '02' [Error] for this Task Type '" + Utils.ConvertBytesToString(this.TaskTypeCode) + "'.";
            return(doc);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Returns the documentation of the XML attributes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetAttributesDocumentationParameters()
        {
            Documentation attributes = new Documentation("Control Service Task", "Attributes", "The following attributes are defined");

            this.AppendCommonAttributes(ref attributes, "<controlServiceItem>", "ControlService");
            attributes.AddTuple("action", "Indicates the action of the task. Valid values are 'start', 'stop', 'restart', 'pause' and 'resume'. The attribute is part of the <controlServiceItem> tag.");
            attributes.AddTuple("waitForStatus", "Indicates whether TaskRunner waits until the final status of the action is reached. Valid values are 'true' and 'false'. The attribute is part of the <controlServiceItem> tag.");
            attributes.AddTuple("timeout", "Indicates the number of seconds to wait until abort of the attempt. Valid values are 0 and positive integers. The attribute is part of the <controlServiceItem> tag.");
            attributes.AddTuple("argumentIsParamName", "Indicates whether the arguments are the parameter names (of global parameters) and not the actual values. Valid values of the parameter are 'true' and 'false'. The attribute is part of the <controlServiceItem> tag and is optional.");
            return(attributes);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Kill Process Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "The process was terminated successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x02), "The process does not exist. Nothing to do");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The process could not be terminated due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "No process to terminate was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x03), "The parameter is not defined");
            return(codes);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Returns the documentation of the XML tags for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetTagDocumentationParameters()
        {
            Documentation tags = new Documentation("Write Log Task", "Tags", "The following specific tags are defined (see also the demo files or the example configuration)");

            this.AppendCommonTags(ref tags, "<writeLogItem>");
            tags.AddTuple("writeLogItem", "Main tag of a Sub-Task within the <items> tag.");
            tags.AddTuple("mainValue", "Defines filename and path of the logfile.");
            tags.AddTuple("header", "Tag to describe a header of a logfile. The particular fields are divided by tabs (\\t).");
            tags.AddTuple("argument", "Each <argument> tag within the <arguments> tag contains one filed of the log entry. No tabs are required. If the argumentIsParamName attribute is set to true, each argument is a global parameter name instead of the actual value. In this case, the value will be resolved at runtime");

            return(tags);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Returns the documentation of the XML attributes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetAttributesDocumentationParameters()
        {
            Documentation attributes = new Documentation("Kill Process Task", "Attributes", "The following attributes are defined");

            this.AppendCommonAttributes(ref attributes, "<killProcessItem>", "KillProcess");
            attributes.AddTuple("argumentIsParamName", "Indicates whether the arguments are the parameter names (of global parameters) and not the actual values. Valid values of the parameter are 'true' and 'false'. The attribute is part of the <killProcessItem> tag and is optional.");
            return(attributes);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Delete Registry-Key (Value) Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "The value was deleted successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x02), "The key is not existing. Nothing to do");
            codes.AddTuple(this.PrintStatusCode(true, 0x03), "The value was not found in the key. Nothing to do");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The value could not be deleted due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "The hive was not defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x03), "No value to delete was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x04), "The hive is not defined / unknown");
            codes.AddTuple(this.PrintStatusCode(false, 0x05), "No key to check was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x06), "The parameter is not defined");
            return(codes);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Returns the static documentation of the execution modes
        /// </summary>
        /// <param name="title">Title to display</param>
        /// <param name="subtitle">Subtitle to display</param>
        /// <returns>Formatted document</returns>
        public Documentation GetStatusModes(string title, string subtitle)
        {
            Documentation doc = new Documentation(title, subtitle, "The Execution Mode (byte 1 of the Execution Code, above indicated as xx) is the type of the task execution. The following modes are defined:");

            doc.AddTuple("01", "No console output, no logging and no halt on errors");
            doc.AddTuple("02", "No console output, no logging and halt on errors");
            doc.AddTuple("03", "No console output, logging and no halt on errors");
            doc.AddTuple("04", "No console output, logging and halt on errors");
            doc.AddTuple("05", "Console Output, no logging and no halt on errors");
            doc.AddTuple("06", "Console output, no logging and halt on errors");
            doc.AddTuple("07", "Console output, logging and no halt on errors");
            doc.AddTuple("08", "Console output, logging and halt on errors");
            return(doc);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Start Program Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "Program was started successfully asynchronous");
            codes.AddTuple(this.PrintStatusCode(true, 0x02), "Program was started successfully synchronous");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The program could not be executed due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "An error occurred during the asynchronous execution");
            codes.AddTuple(this.PrintStatusCode(false, 0x03), "No program to execute was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x04), "The parameter is not defined");
            return(codes);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Write Log Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "Logfile entry was written");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The logfile entry could not be written due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "Logfile could not be created or opened");
            codes.AddTuple(this.PrintStatusCode(false, 0x03), "The directory of the logfile could not be created");
            codes.AddTuple(this.PrintStatusCode(false, 0x04), "No logfile was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x05), "The parameter is not defined");
            return(codes);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Returns the documentation of the status codes for the specific Sub-Task
        /// </summary>
        /// <returns>Documentation object</returns>
        public override Documentation GetDocumentationStatusCodes()
        {
            Documentation codes = new Documentation("Control Service Task", "Status Codes");

            codes.AddTuple(this.PrintStatusCode(true, 0x01), "The service was stopped successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x02), "The service was started successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x03), "The service was restarted successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x04), "The service was paused successfully");
            codes.AddTuple(this.PrintStatusCode(true, 0x05), "The service was resumed successfully");
            codes.AddTuple(this.PrintStatusCode(false, 0x01), "The action could not be performed on the service due to an unknown reason");
            codes.AddTuple(this.PrintStatusCode(false, 0x02), "No service to control was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x03), "No action to control a service was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x04), "An undefined control action was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x05), "No timeout value was defined");
            codes.AddTuple(this.PrintStatusCode(false, 0x06), "The timeout value is invalid");
            codes.AddTuple(this.PrintStatusCode(false, 0x07), "The parameter is not defined");
            return(codes);
        }