// Implementation of abstract method (AbsractWsClient.PrintParammDetail()).
        protected override void PrintParamDetail(string paramName)
        {
            PrintDebugMessage("PrintParamDetail", "Begin", 1);
            wsParameterDetails paramDetail = GetParamDetail(paramName);

            Console.WriteLine("{0}\t{1}", paramDetail.name, paramDetail.type);
            if (paramDetail.description != null)
            {
                Console.WriteLine(paramDetail.description);
            }
            if (paramDetail.values != null)
            {
                foreach (wsParameterValue paramValue in paramDetail.values)
                {
                    Console.Write(paramValue.value);
                    if (paramValue.defaultValue)
                    {
                        Console.Write("\tdefault");
                    }
                    Console.WriteLine();
                    if (paramValue.label != null)
                    {
                        Console.WriteLine("\t{0}", paramValue.label);
                    }
                    if (paramValue.properties != null)
                    {
                        foreach (wsProperty valueProperty in paramValue.properties)
                        {
                            Console.WriteLine("\t{0}\t{1}", valueProperty.key, valueProperty.value);
                        }
                    }
                }
            }
            PrintDebugMessage("PrintParamDetail", "End", 1);
        }
Esempio n. 2
0
		/// <summary>
		/// Get detailed information about a named parameter. 
		/// </summary>
		/// <param name="paramName">Name of the parameter to get the detailed description of.
		/// A <see cref="System.String"/>
		/// </param>
		/// <returns>Object describing the parameter.
		/// A <see cref="wsParameterDetails"/>
		/// </returns>
		public wsParameterDetails GetParamDetail(string paramName)
		{
			PrintDebugMessage("GetParamDetail", "Begin", 1);
			PrintDebugMessage("GetParamDetail", "paramName: " + paramName, 2);
			ServiceProxyConnect();
			wsParameterDetails paramDetail = SrvProxy.getParameterDetails(paramName);
			PrintDebugMessage("GetParamDetail", "End", 1);
			return paramDetail;
		}
        /// <summary>
        /// Get detailed information about a named parameter.
        /// </summary>
        /// <param name="paramName">Name of the parameter to get the detailed description of.
        /// A <see cref="System.String"/>
        /// </param>
        /// <returns>Object describing the parameter.
        /// A <see cref="wsParameterDetails"/>
        /// </returns>
        public wsParameterDetails GetParamDetail(string paramName)
        {
            PrintDebugMessage("GetParamDetail", "Begin", 1);
            if (paramName == null || paramName.Length < 1)
            {
                throw new ClientException("Parameter name is required to fetch parameter details.");
            }
            PrintDebugMessage("GetParamDetail", "paramName: " + paramName, 2);
            ServiceProxyConnect();
            wsParameterDetails paramDetail = SrvProxy.getParameterDetails(paramName);

            PrintDebugMessage("GetParamDetail", "End", 1);
            return(paramDetail);
        }
        // Implementation of abstract method (AbsractWsClient.PrintParammDetail()).
        protected override void PrintParamDetail(string paramName)
        {
            PrintDebugMessage("PrintParamDetail", "Begin", 1);
            if (paramName == null || paramName.Length < 1)
            {
                throw new ClientException("Parameter name is required to print parameter details.");
            }
            wsParameterDetails paramDetail = GetParamDetail(paramName);

            Console.WriteLine("{0}\t{1}", paramDetail.name, paramDetail.type);
            if (paramDetail.description != null)
            {
                Console.WriteLine(paramDetail.description);
            }
            if (paramDetail.values != null)
            {
                foreach (wsParameterValue paramValue in paramDetail.values)
                {
                    Console.Write(paramValue.value);
                    if (paramValue.defaultValue)
                    {
                        Console.Write("\tdefault");
                    }
                    Console.WriteLine();
                    if (paramValue.label != null)
                    {
                        Console.WriteLine("\t{0}", paramValue.label);
                    }
                    if (paramValue.properties != null)
                    {
                        foreach (wsProperty valueProperty in paramValue.properties)
                        {
                            Console.WriteLine("\t{0}\t{1}", valueProperty.key, valueProperty.value);
                        }
                    }
                }
            }
            PrintDebugMessage("PrintParamDetail", "End", 1);
        }