Exemplo n.º 1
0
        /// <summary>
        /// Class XtrmAddons Net Application Serializable User Interface Constructor.
        /// </summary>
        public string GetParameter(string paramName, string paramValue = null, bool setDefault = true)
        {
            ElementBaseObject param = Parameters.FindKeyFirst(paramName);

            if (param != null)
            {
                return(param.Value);
            }
            else if (setDefault)
            {
                return(AddParameter(paramName, paramValue));
            }

            return(paramValue);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Method to add a simple parameter.
        /// </summary>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="paramValue">The value of the parameter.</param>
        /// <returns></returns>
        public string AddParameter(string paramName, string paramValue)
        {
            ElementBaseObject param = Parameters.FindKeyFirst(paramName);

            if (param == null)
            {
                Parameters.Add(new ElementBaseObject( )
                {
                    Key = paramName, Value = paramValue
                });
            }
            else
            {
                param.Value = paramValue;
            }

            return(paramValue);
        }