diff --git a/CryptoExchange.Net.UnitTests/OptionsTests.cs b/CryptoExchange.Net.UnitTests/OptionsTests.cs
index 8771d90..7294c1c 100644
--- a/CryptoExchange.Net.UnitTests/OptionsTests.cs
+++ b/CryptoExchange.Net.UnitTests/OptionsTests.cs
@@ -281,7 +281,7 @@ namespace CryptoExchange.Net.UnitTests
{
}
- public TestClientOptions(TestClientOptions? baseOn): base(baseOn)
+ public TestClientOptions(TestClientOptions baseOn): base(baseOn)
{
if (baseOn == null)
return;
diff --git a/CryptoExchange.Net/Authentication/ApiCredentials.cs b/CryptoExchange.Net/Authentication/ApiCredentials.cs
index 92e1350..3984138 100644
--- a/CryptoExchange.Net/Authentication/ApiCredentials.cs
+++ b/CryptoExchange.Net/Authentication/ApiCredentials.cs
@@ -70,7 +70,8 @@ namespace CryptoExchange.Net.Authentication
public virtual ApiCredentials Copy()
{
if (PrivateKey == null)
- return new ApiCredentials(Key!, Secret!);
+ // Use .ToString() to create a copy of the SecureString
+ return new ApiCredentials(Key!.ToString(), Secret!.ToString());
else
return new ApiCredentials(PrivateKey!.Copy());
}
diff --git a/CryptoExchange.Net/CryptoExchange.Net.csproj b/CryptoExchange.Net/CryptoExchange.Net.csproj
index d474b1f..6e4c727 100644
--- a/CryptoExchange.Net/CryptoExchange.Net.csproj
+++ b/CryptoExchange.Net/CryptoExchange.Net.csproj
@@ -6,16 +6,16 @@
CryptoExchange.Net
JKorf
A base package for implementing cryptocurrency API's
- 5.0.0
- 5.0.0
- 5.0.0
+ 5.1.0
+ 5.1.0
+ 5.1.0
false
git
https://github.com/JKorf/CryptoExchange.Net.git
https://github.com/JKorf/CryptoExchange.Net
en
true
- See https://github.com/JKorf/CryptoExchange.Net#release-notes
+ 5.1.0 - Improved dispose handling in SymbolOrderBook, Fixed TimeSync RecalculationInterval not being respected, Small rework client options
enable
9.0
MIT
diff --git a/CryptoExchange.Net/Objects/Options.cs b/CryptoExchange.Net/Objects/Options.cs
index 16f5eb9..62eb62c 100644
--- a/CryptoExchange.Net/Objects/Options.cs
+++ b/CryptoExchange.Net/Objects/Options.cs
@@ -259,13 +259,12 @@ namespace CryptoExchange.Net.Objects
/// ctor
///
/// Copy values for the provided options
-#pragma warning disable 8618 // Will always get filled by the provided options
+ /// Copy values for the provided options
public ApiClientOptions(ApiClientOptions baseOptions, ApiClientOptions? newValues)
{
BaseAddress = newValues?.BaseAddress ?? baseOptions.BaseAddress;
ApiCredentials = newValues?.ApiCredentials?.Copy() ?? baseOptions.ApiCredentials?.Copy();
}
-#pragma warning restore 8618
///
public override string ToString()
@@ -318,6 +317,7 @@ namespace CryptoExchange.Net.Objects
/// ctor
///
/// Copy values for the provided options
+ /// Copy values for the provided options
public RestApiClientOptions(RestApiClientOptions baseOn, RestApiClientOptions? newValues): base(baseOn, newValues)
{
RateLimitingBehaviour = newValues?.RateLimitingBehaviour ?? baseOn.RateLimitingBehaviour;
diff --git a/README.md b/README.md
index 978f1f0..730e1ed 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,11 @@ I develop and maintain this package on my own for free in my spare time. Donatio
Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf)
## Release notes
+* Version 5.1.0 - 24 Feb 2022
+ * Improved dispose handling in SymbolOrderBook
+ * Fixed TimeSync RecalculationInterval not being respected
+ * Small rework client options
+
* Version 5.0.0
* Added Github.io page for documentation: https://jkorf.github.io/CryptoExchange.Net/
* Added single DateTimeConverter replacing the different timestamp converters