-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SerializerOptions helper class for setting default serializer, …
…Added ParameterCollection for easier parameter definition, Added extra encryption helper methods on AuthenticationProvider
- Loading branch information
Showing
8 changed files
with
397 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Newtonsoft.Json; | ||
using System.Globalization; | ||
|
||
namespace CryptoExchange.Net.Converters | ||
{ | ||
/// <summary> | ||
/// Serializer options | ||
/// </summary> | ||
public static class SerializerOptions | ||
{ | ||
/// <summary> | ||
/// Json serializer settings which includes the EnumConverter, DateTimeConverter and BoolConverter | ||
/// </summary> | ||
public static JsonSerializerSettings WithConverters => new JsonSerializerSettings | ||
{ | ||
DateTimeZoneHandling = DateTimeZoneHandling.Utc, | ||
Culture = CultureInfo.InvariantCulture, | ||
Converters = | ||
{ | ||
new EnumConverter(), | ||
new DateTimeConverter(), | ||
new BoolConverter() | ||
} | ||
}; | ||
|
||
/// <summary> | ||
/// Default json serializer settings | ||
/// </summary> | ||
public static JsonSerializerSettings Default => new JsonSerializerSettings | ||
{ | ||
DateTimeZoneHandling = DateTimeZoneHandling.Utc, | ||
Culture = CultureInfo.InvariantCulture | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.