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; }
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); }