Provides path parameter element
상속: PathItem
예제 #1
0
		private static object GetParameterValue(PathParameter pathParameter, string source)
		{
			if (pathParameter.Type == typeof(string))
				return source;

			if (pathParameter.Type == typeof(int))
				return GetIntParameterValue(source);

			if (pathParameter.Type == typeof(decimal))
				return GetDecimalParameterValue(source);

			if (pathParameter.Type == typeof(bool))
				return GetBoolParameterValue(source);

			if (pathParameter.Type == typeof(string[]))
				return GetStringArrayParameterValue(source);

			if (pathParameter.Type == typeof(int[]))
				return GetIntArrayParameterValue(source);

			if (pathParameter.Type == typeof(decimal[]))
				return GetDecimalArrayParameterValue(source);

			if (pathParameter.Type == typeof(bool[]))
				return GetBoolArrayParameterValue(source);

			return null;
		}
예제 #2
0
        private static object GetParameterValue(PathParameter pathParameter, string source)
        {
            if (pathParameter.Type == typeof(string))
            {
                return(source);
            }

            if (pathParameter.Type == typeof(int))
            {
                return(GetIntParameterValue(source));
            }

            if (pathParameter.Type == typeof(decimal))
            {
                return(GetDecimalParameterValue(source));
            }

            if (pathParameter.Type == typeof(bool))
            {
                return(GetBoolParameterValue(source));
            }

            if (pathParameter.Type == typeof(string[]))
            {
                return(GetStringArrayParameterValue(source));
            }

            if (pathParameter.Type == typeof(int[]))
            {
                return(GetIntArrayParameterValue(source));
            }

            if (pathParameter.Type == typeof(decimal[]))
            {
                return(GetDecimalArrayParameterValue(source));
            }

            if (pathParameter.Type == typeof(bool[]))
            {
                return(GetBoolArrayParameterValue(source));
            }

            return(null);
        }