Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Jun 19, 2024
1 parent 5d50d8c commit 68b28fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private static List<ArrayPropertyInfo> CacheTypeAttributes(Type type)
private static object ParseObject(ref Utf8JsonReader reader, object result, Type objectType)
{
if (reader.TokenType != JsonTokenType.StartArray)
throw new Exception("1");
throw new Exception("Not an array");

if (!_typeAttributesCache.TryGetValue(objectType, out var attributes))
attributes = CacheTypeAttributes(objectType);
Expand Down
3 changes: 3 additions & 0 deletions CryptoExchange.Net/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public static string ToFormData(this IDictionary<string, object> parameters)
var formData = HttpUtility.ParseQueryString(string.Empty);
foreach (var kvp in parameters)
{
if (kvp.Value is null)
continue;

if (kvp.Value.GetType().IsArray)
{
var array = (Array)kvp.Value;
Expand Down

0 comments on commit 68b28fc

Please sign in to comment.