/// <summary>
 /// This value initialises the class withe parameter name and value.
 /// </summary>
 /// <param name="Name">EutParameterList enumerated value</param>
 /// <param name="Value">String: Parameter value</param>
 public EutParameter (
   EutCommandParameters Name,
   String Value )
 {
   this._Name = Name;
   this._Value = Value;
 }
      }//END hasTestParameter value

      //===================================================================================
      /// <summary>
      /// This value checks that a parameter exists in the test action
      /// 
      /// </summary>
      /// <param name="ParameterName">EuTestActionParameters enumerated value.</param>
      /// <returns>Bool:  True indicates the parameter exists.</returns>
      //-----------------------------------------------------------------------------------
      public void setParameter (
        EutCommandParameters ParameterName,
        String Value )
      {
        //
        // Initialise the methods variables and objects.
        //
        EutParameter parameter = new EutParameter ( );
        parameter.Name = ParameterName;
        parameter.Value = Value.Trim();

        //
        // if the option list is null initialise it
        //
        if ( this._optionList == null )
        {
          this._optionList = new List<EutParameter> ( );
        }

        //
        // if the list is empty add the parameter..
        //
        if ( this._optionList.Count == 0 )
        {
          this._optionList.Add ( parameter );
        }

        //
        // Iterate through the parmeter list looking for the parameter 
        //
        foreach ( EutParameter parm in this._optionList )
        {
          //
          // Compare the parameter value 
          //
          if ( parm.Name == ParameterName )
          {
            parm.Value = Value.Trim ( );
          }
        }//END parameter iteration loop

      }//END hasTestParameter value
      }//END hasTestParameter value

      //===================================================================================
      /// <summary>
      /// This value checks that a parameter exists in the test action
      /// 
      /// </summary>
      /// <param name="ParameterName">EuTestActionParameters enumerated value.</param>
      /// <returns>Bool:  True indicates the parameter exists.</returns>
      //-----------------------------------------------------------------------------------
      public bool hasParameter (
        EutCommandParameters ParameterName )
      {
        //
        // create the parameter list if it does not exist.
        //
        if ( this.createParameterList ( ) == false )
        {
          return false;
        }

        //
        // create the list if it does not exist and return validatioen errors.
        //
        if ( this._optionList.Count == 0 )
        {
          this.Result = EutCommandResults.No_Parameters;
          this.AddResponse = "No action parameters ";
          return false;
        }

        //
        // Iterate through the parmeter list looking for the parameter 
        //
        foreach ( EutParameter parameter in this._optionList )
        {
          //
          // Compare the parameter value 
          //
          if ( parameter.Name == ParameterName )
          {
            return true;
          }
        }//END parameter iteration loop

        this.Result = EutCommandResults.Parameter_Missing;
        this.AddResponse = ParameterName + " is missing";

        return false;

      }//END hasTestParameter value
      }//END hasTestParameter value

      //===================================================================================
      /// <summary>
      /// This value checks that a parameter exists in the test action
      /// 
      /// </summary>
      /// <param name="ParameterName">EuTestActionParameters enumerated value.</param>
      /// <returns>Bool:  True indicates the parameter exists.</returns>
      //-----------------------------------------------------------------------------------
      public String getParameter (
        EutCommandParameters ParameterName )
      {
        //
        // create the parameter list if it does not exist.
        //
        if ( this.createParameterList ( ) == false )
        {
          return String.Empty;
        }

        //
        // create the list if it does not exist and return validatioen errors.
        //
        if ( this._optionList.Count == 0 )
        {
          return String.Empty;
        }

        //
        // Iterate through the parmeter list looking for the parameter 
        //
        foreach ( EutParameter parameter in this._optionList )
        {
          //
          // Compare the parameter value 
          //
          if ( parameter.Name == ParameterName )
          {
            return parameter.Value.Trim ( );
          }
        }//END parameter iteration loop

        this.Result = EutCommandResults.Parameter_Missing;
        this.AddResponse = ParameterName + " missing.";

        return String.Empty;

      }//END hasTestParameter value
      }//END hasReverseStatus method

      //===================================================================================
      /// <summary>
      /// This value checks that a parameter exists in the test action
      /// 
      /// </summary>
      /// <param name="ParameterName">EuTestActionParameters enumerated value.</param>
      /// <returns>Bool:  True indicates the parameter exists.</returns>
      //-----------------------------------------------------------------------------------
      public bool hasParameterOptional (
        EutCommandParameters ParameterName )
      {
        //
        // create the parameter list if it does not exist.
        //
        if ( this.createParameterList ( ) == false )
        {
          return false;
        }

        //
        // create the list if it does not exist and return validatioen errors.
        //
        if ( this._optionList.Count == 0 )
        {
          return false;
        }

        //
        // Iterate through the parmeter list looking for the parameter 
        //
        foreach ( EutParameter parameter in this._optionList )
        {
          //
          // Compare the parameter value 
          //
          if ( parameter.Name.ToString ( ).ToLower ( ) == ParameterName.ToString ( ).ToLower ( ) )
          {
            return true;
          }
        }//END parameter iteration loop

        return false;

      }//END hasTestParameter value
      //===================================================================================
      /// <summary>
      /// This value checks that a parameter exists in the test action
      /// 
      /// </summary>
      /// <param name="Parameter">EuTestActionParameters enumerated value.</param>
      /// <returns>Bool:  True indicates the parameter exists.</returns>
      //-----------------------------------------------------------------------------------
      public bool createParameterList ( )
      {
        //
        // If option list exists then exit as it does not need to be created.
        //
        if ( this._optionList.Count > 0 )
        {
          return true;
        }

        //
        // If there are no parameters then exit with error as nothing can be created.
        //
        if ( this._Parameters == String.Empty )
        {
          return false;
        }

        //
        // initialise the methods variables and objects.
        //
        string [ ] arParameters = this._Parameters.Split ( ';' );
        EutCommandParameters enParameter = EutCommandParameters.Null;
        this.AddResponse = String.Empty;

        //
        // Iterate through the parameters array creating a parameter list.
        //
        foreach ( String parameter in arParameters )
        {
          //
          // exit is parmeter is empty.
          //
          if ( parameter == String.Empty )
          {
            return false;
          }


          //
          // exit is parmeter is empty.
          //
          if ( parameter.Contains ( "=" ) == false )
          {
            return false;
          }

          int eqIndex = parameter.IndexOf ( '=' );
          string parmeterName = parameter.Substring ( 0, eqIndex );
          String parmeterValue = parameter.Substring ( eqIndex + 1 );

          parmeterName = parmeterName.Trim ( );

          //
          // validate that the parameter is valid.
          //
          if ( EvStatics.tryParseEnumValue<EutCommandParameters> ( parmeterName, out enParameter ) == false )
          {
            this.Result = EutCommandResults.Parameter_Validation_Failure;
            this.AddResponse = "Parameter : " + parmeterName + " failed type validation. ";
            return false;
          }

          this._optionList.Add ( new EutParameter ( enParameter, parmeterValue.Trim ( ) ) );

        }//End parameter iteration loop.

        //
        // test to see if the value value needs to be reversed.
        //
        this.hasReverseStatus ( );

        return true;

      }//END createParameterList method