//================================================================================== /// <summary> /// This method deletes the query parameter from the parameter list. /// </summary> /// <param name="Name">EiQueryParameterNames enumeration</param> //----------------------------------------------------------------------------------- public void DeleteQueryParameter( EiQueryParameterNames Name) { // // If ParameterList is null initialise it. // if (this.ParameterList == null) { return; } // // Iterate through the parameters and update the matching parameter value. // for (int count = 0; count < this.ParameterList.Count; count++) { EiQueryParameter parameter = this.ParameterList [count]; if (parameter.Name.ToString( ) == Name.ToString( )) { ParameterList.RemoveAt(count); count--; } } }
}//END hasQueryParameter method //================================================================================== /// <summary> /// This method adds a query parameter value to the query parameter list /// </summary> /// <param name="Name">EiQueryParameterNames enumeration</param> /// <param name="Value">String Value</param> //----------------------------------------------------------------------------------- public void AddQueryParameter( EiQueryParameterNames Name, String Value) { // // If ParameterList is null initialise it. // if (this.ParameterList == null) { this.ParameterList = new List <EiQueryParameter> ( ); } // // Iterate through the parameters and update the matching parameter value. // foreach (EiQueryParameter parameter in this.ParameterList) { if (parameter.Name.ToString( ) == Name.ToString( )) { parameter.Value = Value; return; } } // // Append the parameter to the parameter list. // this.ParameterList.Add(new EiQueryParameter(Name, Value)); }