1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-21 05:13:21 +00:00

Fixed various info-warnings and spelling issues

This commit is contained in:
JKorf
2025-02-09 21:25:26 +01:00
parent 024e8dcfe2
commit e07f24ea0a
47 changed files with 126 additions and 118 deletions
+8 -8
View File
@@ -10,9 +10,9 @@ namespace CryptoExchange.Net
public static class LibraryHelpers
{
/// <summary>
/// Client order id seperator
/// Client order id separator
/// </summary>
public const string ClientOrderIdSeperator = "JK";
public const string ClientOrderIdSeparator = "JK";
/// <summary>
/// Apply broker id to a client order id
@@ -20,25 +20,25 @@ namespace CryptoExchange.Net
/// <param name="clientOrderId"></param>
/// <param name="brokerId"></param>
/// <param name="maxLength"></param>
/// <param name="allowValueAdjustement"></param>
/// <param name="allowValueAdjustment"></param>
/// <returns></returns>
public static string ApplyBrokerId(string? clientOrderId, string brokerId, int maxLength, bool allowValueAdjustement)
public static string ApplyBrokerId(string? clientOrderId, string brokerId, int maxLength, bool allowValueAdjustment)
{
var reservedLength = brokerId.Length + ClientOrderIdSeperator.Length;
var reservedLength = brokerId.Length + ClientOrderIdSeparator.Length;
if ((clientOrderId?.Length + reservedLength) > maxLength)
return clientOrderId!;
if (!string.IsNullOrEmpty(clientOrderId))
{
if (allowValueAdjustement)
clientOrderId = brokerId + ClientOrderIdSeperator + clientOrderId;
if (allowValueAdjustment)
clientOrderId = brokerId + ClientOrderIdSeparator + clientOrderId;
return clientOrderId!;
}
else
{
clientOrderId = ExchangeHelpers.AppendRandomString(brokerId + ClientOrderIdSeperator, maxLength);
clientOrderId = ExchangeHelpers.AppendRandomString(brokerId + ClientOrderIdSeparator, maxLength);
}
return clientOrderId;