mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Added testing check for year 1 datetime
This commit is contained in:
parent
bbbdac2fd3
commit
23b07d709e
@ -11,12 +11,12 @@ namespace CryptoExchange.Net.Authentication
|
|||||||
public class ApiCredentials
|
public class ApiCredentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api key to authenticate requests
|
/// The api key / label to authenticate requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Key { get; }
|
public string Key { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The api secret to authenticate requests
|
/// The api secret or private key to authenticate requests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Secret { get; }
|
public string Secret { get; }
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ namespace CryptoExchange.Net.Authentication
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create Api credentials providing an api key and secret for authentication
|
/// Create Api credentials providing an api key and secret for authentication
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The api key used for identification</param>
|
/// <param name="key">The api key / label used for identification</param>
|
||||||
/// <param name="secret">The api secret used for signing</param>
|
/// <param name="secret">The api secret or private key used for signing</param>
|
||||||
public ApiCredentials(string key, string secret) : this(key, secret, ApiCredentialsType.Hmac)
|
public ApiCredentials(string key, string secret) : this(key, secret, ApiCredentialsType.Hmac)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -37,8 +37,8 @@ namespace CryptoExchange.Net.Authentication
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create Api credentials providing an api key and secret for authentication
|
/// Create Api credentials providing an api key and secret for authentication
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The api key used for identification</param>
|
/// <param name="key">The api key / label used for identification</param>
|
||||||
/// <param name="secret">The api secret used for signing</param>
|
/// <param name="secret">The api secret or private key used for signing</param>
|
||||||
/// <param name="credentialsType">The type of credentials</param>
|
/// <param name="credentialsType">The type of credentials</param>
|
||||||
public ApiCredentials(string key, string secret, ApiCredentialsType credentialsType)
|
public ApiCredentials(string key, string secret, ApiCredentialsType credentialsType)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ namespace CryptoExchange.Net.Testing.Comparers
|
|||||||
{
|
{
|
||||||
if (propertyValue == default && propValue.Type != JTokenType.Null && !string.IsNullOrEmpty(propValue.ToString()))
|
if (propertyValue == default && propValue.Type != JTokenType.Null && !string.IsNullOrEmpty(propValue.ToString()))
|
||||||
{
|
{
|
||||||
if (propertyType == typeof(DateTime?) && (propValue.ToString() == "" || propValue.ToString() == "0" || propValue.ToString() == "-1"))
|
if (propertyType == typeof(DateTime?) && (propValue.ToString() == "" || propValue.ToString() == "0" || propValue.ToString() == "-1" || propValue.ToString() == "01/01/0001 00:00:00"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Property value not correct
|
// Property value not correct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user