use default value of parameter if available
This commit is contained in:
@@ -551,6 +551,8 @@ public class ApiServer : IApiServer
|
||||
objs.Add(Convert.ChangeType(HttpUtility.UrlDecode(parameterValue), info.ParameterType)); // or Uri.UnescapeDataString(); maybe run this line twice?
|
||||
else if (queryparams.AllKeys.FirstOrDefault(n => n != null && n.Equals(info.Name, StringComparison.InvariantCultureIgnoreCase)) is string querykey)
|
||||
objs.Add(Convert.ChangeType(HttpUtility.UrlDecode(queryparams.Get(querykey)), info.ParameterType));
|
||||
else if (info.HasDefaultValue)
|
||||
objs.Add(info.DefaultValue);
|
||||
else
|
||||
objs.Add(null);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.6.8</Version>
|
||||
<Version>2.6.9</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user