diff --git a/cake-build/helpers/utils.cake b/cake-build/helpers/utils.cake
index a9562d00a..5788ed546 100644
--- a/cake-build/helpers/utils.cake
+++ b/cake-build/helpers/utils.cake
@@ -49,13 +49,12 @@ public void RestoreSolution(FilePath solutionPath)
try
{
Information("Running dotnet restore...");
- // Suppress NU1903 vulnerability warning for Newtonsoft.Json 9.0.1 (known issue, accepted risk)
- // Also suppress restore warning as errors NU1503 for xamarin/old style projects
+ // Suppress restore warning as errors NU1503 for xamarin/old style projects
var restoreSettings = new DotNetRestoreSettings
{
MSBuildSettings = new DotNetMSBuildSettings()
- .WithProperty("WarningsNotAsErrors", "NU1903;NU1503")
- .WithProperty("NoWarn", "NU1903;NU1503")
+ .WithProperty("WarningsNotAsErrors", "NU1503")
+ .WithProperty("NoWarn", "NU1503")
};
DotNetRestore(solutionPath.FullPath, restoreSettings);
Information($"✓ dotnet restore completed");
diff --git a/cake-build/tasks/build.cake b/cake-build/tasks/build.cake
index 347035619..a6e5527f6 100644
--- a/cake-build/tasks/build.cake
+++ b/cake-build/tasks/build.cake
@@ -64,11 +64,8 @@ Task("_NetStandard_Build")
Configuration = configuration,
NoRestore = true
};
+ var msbuildSettings = new DotNetMSBuildSettings();
- // Suppress NU1903 vulnerability warning for Newtonsoft.Json 9.0.1 (known issue, accepted risk)
- var msbuildSettings = new DotNetMSBuildSettings()
- .WithProperty("WarningsNotAsErrors", "NU1903")
- .WithProperty("NoWarn", "NU1903");
if (!string.IsNullOrEmpty(defineConstants))
{
diff --git a/examples/AndroidSample/AndroidSample.csproj b/examples/AndroidSample/AndroidSample.csproj
index f2cce77c9..034b06540 100644
--- a/examples/AndroidSample/AndroidSample.csproj
+++ b/examples/AndroidSample/AndroidSample.csproj
@@ -65,8 +65,8 @@
..\..\src\packages\MsgPack.Cli.0.9.1\lib\MonoAndroid10\MsgPack.dll
-
- ..\..\src\packages\Newtonsoft.Json.10.0.3\lib\netstandard1.3\Newtonsoft.Json.dll
+
+ ..\..\src\packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll
diff --git a/examples/AndroidSample/packages.config b/examples/AndroidSample/packages.config
index b7bca62ac..c68f03b46 100644
--- a/examples/AndroidSample/packages.config
+++ b/examples/AndroidSample/packages.config
@@ -5,7 +5,7 @@
-
+
diff --git a/nuget/io.ably.nuspec b/nuget/io.ably.nuspec
index ab0c9446b..f7b888299 100644
--- a/nuget/io.ably.nuspec
+++ b/nuget/io.ably.nuspec
@@ -32,15 +32,15 @@
-
+
-
+
-
+
diff --git a/src/.nuget/NuGet.Config b/src/.nuget/NuGet.Config
deleted file mode 100644
index 67f8ea046..000000000
--- a/src/.nuget/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.nuget/packages.config b/src/.nuget/packages.config
deleted file mode 100644
index 26b6c1051..000000000
--- a/src/.nuget/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Android/IO.Ably.Android.csproj b/src/IO.Ably.Android/IO.Ably.Android.csproj
index e5b26ca11..c9288aeaa 100644
--- a/src/IO.Ably.Android/IO.Ably.Android.csproj
+++ b/src/IO.Ably.Android/IO.Ably.Android.csproj
@@ -68,8 +68,8 @@
..\packages\MsgPack.Cli.0.9.2\lib\MonoAndroid10\MsgPack.dll
-
- ..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll
diff --git a/src/IO.Ably.Android/packages.config b/src/IO.Ably.Android/packages.config
index 740d5f2d7..ce7e611fc 100644
--- a/src/IO.Ably.Android/packages.config
+++ b/src/IO.Ably.Android/packages.config
@@ -7,7 +7,7 @@
-
+
diff --git a/src/IO.Ably.NETFramework/IO.Ably.NETFramework.csproj b/src/IO.Ably.NETFramework/IO.Ably.NETFramework.csproj
index afaa584ec..33a68a220 100644
--- a/src/IO.Ably.NETFramework/IO.Ably.NETFramework.csproj
+++ b/src/IO.Ably.NETFramework/IO.Ably.NETFramework.csproj
@@ -60,8 +60,8 @@
-
- ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
diff --git a/src/IO.Ably.NETFramework/Platform.cs b/src/IO.Ably.NETFramework/Platform.cs
index f6765f3e6..67adc95fc 100644
--- a/src/IO.Ably.NETFramework/Platform.cs
+++ b/src/IO.Ably.NETFramework/Platform.cs
@@ -9,12 +9,7 @@ internal class Platform : IPlatform
{
private static readonly object _lock = new object();
- static Platform()
- {
- Initialize();
- }
-
- internal static bool HookedUpToNetworkEvents { get; private set; }
+ internal static bool HookedUpToNetworkEvents { get; set; }
public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Framework;
@@ -22,11 +17,6 @@ static Platform()
public IMobileDevice MobileDevice { get; set; }
- internal static void Initialize()
- {
- HookedUpToNetworkEvents = false;
- }
-
public void RegisterOsNetworkStateChanged()
{
lock (_lock)
diff --git a/src/IO.Ably.NETFramework/packages.config b/src/IO.Ably.NETFramework/packages.config
index c565db450..63e0caaa8 100644
--- a/src/IO.Ably.NETFramework/packages.config
+++ b/src/IO.Ably.NETFramework/packages.config
@@ -2,7 +2,7 @@
-
+
diff --git a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj
index 47eefd81e..14467fe65 100644
--- a/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj
+++ b/src/IO.Ably.NETStandard20/IO.Ably.NETStandard20.csproj
@@ -46,7 +46,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/src/IO.Ably.NETStandard20/Platform.cs b/src/IO.Ably.NETStandard20/Platform.cs
index 72eeaa9b5..2f9dc6fe1 100644
--- a/src/IO.Ably.NETStandard20/Platform.cs
+++ b/src/IO.Ably.NETStandard20/Platform.cs
@@ -1,4 +1,6 @@
-using System.Net.NetworkInformation;
+using System;
+using System.Net.NetworkInformation;
+using System.Runtime.InteropServices;
using IO.Ably.Push;
using IO.Ably.Realtime;
using IO.Ably.Transport;
@@ -8,32 +10,51 @@ namespace IO.Ably
internal class Platform : IPlatform
{
private static readonly object Lock = new object();
+ private readonly Lazy _platformId;
- static Platform()
+ public Platform()
{
- Initialize();
+ _platformId = new Lazy(DetectPlatformRuntime);
}
- internal static bool HookedUpToNetworkEvents { get; private set; }
+ internal static bool HookedUpToNetworkEvents { get; set; }
- // Defined as per https://learn.microsoft.com/en-us/dotnet/standard/frameworks#preprocessor-symbols
-#if NET6_0
- public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Net6;
-#elif NET7_0
- public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Net7;
-#else
- public Agent.PlatformRuntime PlatformId => Agent.PlatformRuntime.Netstandard20;
-#endif
+ // Use runtime detection via RuntimeInformation.FrameworkDescription
+ // This detects the actual runtime version, not the compile-time target framework
+ // This is important because netstandard2.0 assemblies can run on .NET 6/7/8/9+
+ // and we want to report the actual runtime being used
+ public Agent.PlatformRuntime PlatformId => _platformId.Value;
- public ITransportFactory TransportFactory => null;
+ private Agent.PlatformRuntime DetectPlatformRuntime()
+ {
+ // Default fallback for netstandard2.0 or unknown runtimes
+ var platformId = Agent.PlatformRuntime.Netstandard20;
- public IMobileDevice MobileDevice { get; set; }
+ try
+ {
+ var frameworkDescription = RuntimeInformation.FrameworkDescription;
- internal static void Initialize()
- {
- HookedUpToNetworkEvents = false;
+ if (frameworkDescription.StartsWith(".NET 6.", StringComparison.OrdinalIgnoreCase))
+ {
+ platformId = Agent.PlatformRuntime.Net6;
+ }
+ else if (frameworkDescription.StartsWith(".NET 7.", StringComparison.OrdinalIgnoreCase))
+ {
+ platformId = Agent.PlatformRuntime.Net7;
+ }
+ }
+ catch
+ {
+ // fall back to Netstandard20
+ }
+
+ return platformId;
}
+ public ITransportFactory TransportFactory => null;
+
+ public IMobileDevice MobileDevice { get; set; }
+
public void RegisterOsNetworkStateChanged()
{
lock (Lock)
diff --git a/src/IO.Ably.Platforms/Ably.android/Ably.android.csproj b/src/IO.Ably.Platforms/Ably.android/Ably.android.csproj
deleted file mode 100644
index da16eb9bd..000000000
--- a/src/IO.Ably.Platforms/Ably.android/Ably.android.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {FD71E7A8-23D6-400B-B589-9A5289008C9A}
- {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
- Properties
- AblyPlatform
- AblyPlatform
- 512
- Resources\Resource.Designer.cs
- Off
- True
- v6.0
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
- ..\..\packages\WebSocket4Net.0.14.1\lib\monoandroid23\WebSocket4Net.dll
- True
-
-
-
-
- PlatformImpl.cs
-
-
- Cryptography\AesCipher.cs
-
-
- Cryptography\CryptoImpl.cs
-
-
- WebSocketTransport.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
- {ef341e0a-733d-4f79-8303-fd1b10d778eb}
- Ably.Core
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.android/Properties/AssemblyInfo.cs b/src/IO.Ably.Platforms/Ably.android/Properties/AssemblyInfo.cs
deleted file mode 100644
index 04da54313..000000000
--- a/src/IO.Ably.Platforms/Ably.android/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using Android.App;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle( "Ably.android" )]
-[assembly: AssemblyDescription( "" )]
-[assembly: AssemblyConfiguration( "" )]
-[assembly: AssemblyCompany( "" )]
-[assembly: AssemblyProduct( "Ably.android" )]
-[assembly: AssemblyCopyright( "Copyright © 2016" )]
-[assembly: AssemblyTrademark( "" )]
-[assembly: AssemblyCulture( "" )]
-[assembly: ComVisible( false )]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion( "1.0.0.0" )]
-[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/src/IO.Ably.Platforms/Ably.android/Resources/AboutResources.txt b/src/IO.Ably.Platforms/Ably.android/Resources/AboutResources.txt
deleted file mode 100644
index c2bca974c..000000000
--- a/src/IO.Ably.Platforms/Ably.android/Resources/AboutResources.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Images, layout descriptions, binary blobs and string dictionaries can be included
-in your application as resource files. Various Android APIs are designed to
-operate on the resource IDs instead of dealing with images, strings or binary blobs
-directly.
-
-For example, a sample Android app that contains a user interface layout (main.axml),
-an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
-would keep its resources in the "Resources" directory of the application:
-
-Resources/
- drawable/
- icon.png
-
- layout/
- main.axml
-
- values/
- strings.xml
-
-In order to get the build system to recognize Android resources, set the build action to
-"AndroidResource". The native Android APIs do not operate directly with filenames, but
-instead operate on resource IDs. When you compile an Android application that uses resources,
-the build system will package the resources for distribution and generate a class called "R"
-(this is an Android convention) that contains the tokens for each one of the resources
-included. For example, for the above Resources layout, this is what the R class would expose:
-
-public class R {
- public class drawable {
- public const int icon = 0x123;
- }
-
- public class layout {
- public const int main = 0x456;
- }
-
- public class strings {
- public const int first_string = 0xabc;
- public const int second_string = 0xbcd;
- }
-}
-
-You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
-to reference the layout/main.axml file, or R.strings.first_string to reference the first
-string in the dictionary file values/strings.xml.
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.android/Resources/Resource.Designer.cs b/src/IO.Ably.Platforms/Ably.android/Resources/Resource.Designer.cs
deleted file mode 100644
index 1896cb01f..000000000
--- a/src/IO.Ably.Platforms/Ably.android/Resources/Resource.Designer.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma warning disable 1591
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-[assembly: global::Android.Runtime.ResourceDesignerAttribute("AblyPlatform.Resource", IsApplication=false)]
-
-namespace AblyPlatform
-{
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
- public partial class Resource
- {
-
- static Resource()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- public partial class Attribute
- {
-
- static Attribute()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Attribute()
- {
- }
- }
-
- public partial class String
- {
-
- // aapt resource value: 0x7f020001
- public static int ApplicationName = 2130837505;
-
- // aapt resource value: 0x7f020000
- public static int Hello = 2130837504;
-
- static String()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private String()
- {
- }
- }
- }
-}
-#pragma warning restore 1591
diff --git a/src/IO.Ably.Platforms/Ably.android/Resources/Values/Strings.xml b/src/IO.Ably.Platforms/Ably.android/Resources/Values/Strings.xml
deleted file mode 100644
index 8fd17630e..000000000
--- a/src/IO.Ably.Platforms/Ably.android/Resources/Values/Strings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- Hello World, Click Me!
- $projectname$
-
diff --git a/src/IO.Ably.Platforms/Ably.android/packages.config b/src/IO.Ably.Platforms/Ably.android/packages.config
deleted file mode 100644
index 87ada54c2..000000000
--- a/src/IO.Ably.Platforms/Ably.android/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.ios/Ably.ios.csproj b/src/IO.Ably.Platforms/Ably.ios/Ably.ios.csproj
deleted file mode 100644
index ffdf7246d..000000000
--- a/src/IO.Ably.Platforms/Ably.ios/Ably.ios.csproj
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
- Debug
- iPhoneSimulator
- 8.0.30703
- 2.0
- {E59720A7-9C94-4191-A073-23724FA34994}
- {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
- AblyPlatform
- Resources
- AblyPlatform
-
-
- true
- full
- false
- bin\iPhone\Debug
- DEBUG
- prompt
- 4
- false
- true
- iPhone Developer
-
-
- none
- true
- bin\iPhone\Release
- prompt
- 4
- false
- iPhone Developer
-
-
-
- Cryptography\AesCipher.cs
-
-
- Cryptography\CryptoImpl.cs
-
-
- WebSocketTransport.cs
-
-
-
-
-
-
- {ef341e0a-733d-4f79-8303-fd1b10d778eb}
- Ably.Core
-
-
-
-
-
-
-
- ..\..\packages\WebSocket4Net.0.14.1\lib\Xamarin.iOS10\WebSocket4Net.dll
- True
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.ios/PlatformImpl.cs b/src/IO.Ably.Platforms/Ably.ios/PlatformImpl.cs
deleted file mode 100644
index 777b1ad96..000000000
--- a/src/IO.Ably.Platforms/Ably.ios/PlatformImpl.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using IO.Ably.Platform;
-using IO.Ably.Transport;
-
-namespace AblyPlatform
-{
- public class PlatformImpl : IPlatform
- {
- string IPlatform.GetConnectionString()
- {
- throw new NotSupportedException();
- }
-
- ICrypto IPlatform.GetCrypto()
- {
- return new Cryptography.CryptoImpl();
- }
-
- ITransportFactory IPlatform.GetWebSocketsFactory()
- {
- return new WebSocketTransport.WebSocketTransportFactory();
- }
- }
-}
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.ios/Properties/AssemblyInfo.cs b/src/IO.Ably.Platforms/Ably.ios/Properties/AssemblyInfo.cs
deleted file mode 100644
index e8d04d429..000000000
--- a/src/IO.Ably.Platforms/Ably.ios/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle( "Ably.ios" )]
-[assembly: AssemblyDescription( "" )]
-[assembly: AssemblyConfiguration( "" )]
-[assembly: AssemblyCompany( "" )]
-[assembly: AssemblyProduct( "Ably.ios" )]
-[assembly: AssemblyCopyright( "Copyright © 2016" )]
-[assembly: AssemblyTrademark( "" )]
-[assembly: AssemblyCulture( "" )]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible( false )]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid( "e59720a7-9c94-4191-a073-23724fa34994" )]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion( "1.0.0.0" )]
-[assembly: AssemblyFileVersion( "1.0.0.0" )]
diff --git a/src/IO.Ably.Platforms/Ably.ios/packages.config b/src/IO.Ably.Platforms/Ably.ios/packages.config
deleted file mode 100644
index b2e7a3891..000000000
--- a/src/IO.Ably.Platforms/Ably.ios/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/Cryptography/AesCipher.cs b/src/IO.Ably.Platforms/Ably.net45/Cryptography/AesCipher.cs
deleted file mode 100644
index 8a0b4d485..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/Cryptography/AesCipher.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-using IO.Ably;
-using IO.Ably.Encryption;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-
-namespace AblyPlatform.Cryptography
-{
- /// Cipher implementation using RinjaelManaged class under the hood.
- /// The Cipher params decide the Cipher mode and key
- /// The Iv vector is generated on each encryption request and added to the encrypted data stream.
- internal class AesCipher : IChannelCipher
- {
- private readonly CipherParams _params;
-
- /// Create a new instance of AesCipther.
- /// Cipher params used to configure the RinjaelManaged algorithm
- public AesCipher( CipherParams @params )
- {
- _params = @params;
- }
-
- static readonly Dictionary s_modes = new Dictionary()
- {
- { IO.Ably.Encryption.CipherMode.CBC, System.Security.Cryptography.CipherMode.CBC },
- { IO.Ably.Encryption.CipherMode.ECB, System.Security.Cryptography.CipherMode.ECB },
- { IO.Ably.Encryption.CipherMode.OFB, System.Security.Cryptography.CipherMode.OFB },
- { IO.Ably.Encryption.CipherMode.CFB , System.Security.Cryptography.CipherMode.CFB },
- { IO.Ably.Encryption.CipherMode.CTS , System.Security.Cryptography.CipherMode.CTS },
- };
-
- private static byte[] Encrypt( byte[] input, byte[] key, int keySize, System.Security.Cryptography.CipherMode mode, byte[] iv = null )
- {
- using( var aesEncryption = new RijndaelManaged() )
- {
- if( iv == null )
- aesEncryption.GenerateIV();
- else
- {
- aesEncryption.IV = iv;
- }
-
- aesEncryption.KeySize = keySize;
- aesEncryption.BlockSize = Crypto.DefaultBlocklength * 8;
- aesEncryption.Mode = mode;
- aesEncryption.Padding = PaddingMode.PKCS7;
- aesEncryption.Key = key;
- ICryptoTransform crypto = aesEncryption.CreateEncryptor();
-
- // The result of the encryption and decryption
- byte[] cipherText = crypto.TransformFinalBlock(input, 0, input.Length);
- var result = new byte[cipherText.Length + aesEncryption.IV.Length];
- Buffer.BlockCopy( aesEncryption.IV, 0, result, 0, aesEncryption.IV.Length );
- Buffer.BlockCopy( cipherText, 0, result, aesEncryption.IV.Length, cipherText.Length );
- return result;
- }
- }
-
- static byte[] Decrypt( byte[] input, byte[] key, int keySize, System.Security.Cryptography.CipherMode mode )
- {
- byte[] iv = input.Take(Crypto.DefaultBlocklength).ToArray();
- using( var aesEncryption = new RijndaelManaged() )
- {
- aesEncryption.KeySize = keySize;
- aesEncryption.BlockSize = Crypto.DefaultBlocklength * 8;
- aesEncryption.Mode = mode;
- aesEncryption.Padding = PaddingMode.PKCS7;
- aesEncryption.IV = iv;
- aesEncryption.Key = key;
-
- ICryptoTransform decrypt = aesEncryption.CreateDecryptor();
- var encryptedBuffer = input.Skip(Crypto.DefaultBlocklength).ToArray();
- return decrypt.TransformFinalBlock( encryptedBuffer, 0, encryptedBuffer.Length );
- }
- }
-
- public string Algorithm
- {
- get { return "AES"; }
- }
-
- /// Encrypt a byte[] using the CipherParams provided in the constructor
- /// byte[] to be encrypted
- /// Encrypted result
- public byte[] Encrypt( byte[] input )
- {
- try
- {
- return Encrypt( input, _params.Key, _params.KeyLength, s_modes[ _params.Mode ], _params.Iv );
- }
- catch( Exception ex )
- {
- throw new AblyException( ex );
- }
- }
-
- /// Decrypt an encrypted byte[] using the CipherParams provided in the constructor
- /// encrypted byte[]
- /// decrypted byte[]
- public byte[] Decrypt( byte[] input )
- {
- try
- {
- return Decrypt( input, _params.Key, _params.KeyLength, s_modes[ _params.Mode ] );
- }
- catch( Exception ex )
- {
- throw new AblyException( ex );
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/Cryptography/CryptoImpl.cs b/src/IO.Ably.Platforms/Ably.net45/Cryptography/CryptoImpl.cs
deleted file mode 100644
index 521a0daad..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/Cryptography/CryptoImpl.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using IO.Ably.Encryption;
-using IO.Ably.Platform;
-using System;
-using System.Net;
-using System.Security.Cryptography;
-using IO.Ably;
-
-namespace AblyPlatform.Cryptography
-{
- internal class CryptoImpl : ICrypto
- {
- string ICrypto.ComputeHMacSha256( string text, string key )
- {
- byte[] bytes = text.GetBytes();
- byte[] keyBytes = key.GetBytes();
- using( var hmac = new HMACSHA256( keyBytes ) )
- {
- hmac.ComputeHash( bytes );
- return Convert.ToBase64String( hmac.Hash );
- }
- }
-
- IChannelCipher ICrypto.GetCipher( CipherParams p )
- {
- if( string.Equals( p.Algorithm, Crypto.DefaultAlgorithm, StringComparison.CurrentCultureIgnoreCase ) )
- return new AesCipher( p );
-
- throw new AblyException( "Currently only the AES encryption algorithm is supported", ErrorCodes.InternalError, HttpStatusCode.InternalServerError );
- }
-
- CipherParams ICrypto.GetDefaultParams()
- {
- using( var aes = new AesCryptoServiceProvider() )
- {
- aes.KeySize = Crypto.DefaultKeylength;
- aes.Mode = System.Security.Cryptography.CipherMode.CBC;
- aes.Padding = PaddingMode.PKCS7;
- aes.BlockSize = Crypto.DefaultBlocklength * 8;
- aes.GenerateKey();
- return new CipherParams( aes.Key );
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/IO.Ably.net45.csproj b/src/IO.Ably.Platforms/Ably.net45/IO.Ably.net45.csproj
deleted file mode 100644
index 0bb28cf4a..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/IO.Ably.net45.csproj
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {021875BE-63FD-4FF4-B34F-0B77CCD1919E}
- Library
- Properties
- AblyPlatform
- AblyPlatform
- v4.5
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
-
-
-
-
-
-
-
-
-
-
- ..\..\packages\WebSocket4Net.0.14.1\lib\net45\WebSocket4Net.dll
- True
-
-
-
-
-
-
-
-
-
-
-
- {ef341e0a-733d-4f79-8303-fd1b10d778eb}
- IO.Ably
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/PlatformImpl.cs b/src/IO.Ably.Platforms/Ably.net45/PlatformImpl.cs
deleted file mode 100644
index 9185a8a2a..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/PlatformImpl.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using IO.Ably.Platform;
-using IO.Ably.Transport;
-using System.Configuration;
-
-namespace AblyPlatform
-{
- public class PlatformImpl : IPlatform
- {
- public PlatformImpl() { }
-
- string IPlatform.GetConnectionString()
- {
- var connString = ConfigurationManager.ConnectionStrings[ "Ably" ];
- if( connString == null )
- {
- return string.Empty;
- }
- return connString.ConnectionString;
- }
-
- ICrypto IPlatform.GetCrypto()
- {
- return new Cryptography.CryptoImpl();
- }
-
- ITransportFactory IPlatform.GetWebSocketsFactory()
- {
- return new WebSocketTransport.WebSocketTransportFactory();
- }
- }
-}
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/Properties/AssemblyInfo.cs b/src/IO.Ably.Platforms/Ably.net45/Properties/AssemblyInfo.cs
deleted file mode 100644
index 705774ed6..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Ably.net45")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Ably.net45")]
-[assembly: AssemblyCopyright("Copyright © 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("021875be-63fd-4ff4-b34f-0b77ccd1919e")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/IO.Ably.Platforms/Ably.net45/WebSocketTransport.cs b/src/IO.Ably.Platforms/Ably.net45/WebSocketTransport.cs
deleted file mode 100644
index fdbd96e7e..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/WebSocketTransport.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-using IO.Ably.Transport;
-using IO.Ably.Types;
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Text;
-using WebSocket4Net;
-
-namespace AblyPlatform
-{
- internal class WebSocketTransport : ITransport
- {
- public class WebSocketTransportFactory : ITransportFactory
- {
- public ITransport CreateTransport( TransportParams parameters )
- {
- IMessageSerializer serializer = null;
- if( parameters.Options.UseBinaryProtocol )
- {
- serializer = new MsgPackMessageSerializer();
- }
- else
- {
- serializer = new JsonMessageSerializer();
- }
- WebSocketTransport socketTransport = new WebSocketTransport(serializer);
- socketTransport.Host = parameters.Host;
- socketTransport.channelBinaryMode = parameters.Options.UseBinaryProtocol;
- socketTransport.socket = CreateSocket( parameters );
- socketTransport.socket.Opened += socketTransport.socket_Opened;
- socketTransport.socket.Closed += socketTransport.socket_Closed;
- socketTransport.socket.Error += socketTransport.socket_Error;
- socketTransport.socket.MessageReceived += socketTransport.socket_MessageReceived;
- socketTransport.socket.DataReceived += socketTransport.socket_DataReceived;
- return socketTransport;
- }
- }
-
- private WebSocketTransport( IMessageSerializer serializer )
- {
- this.serializer = serializer;
- }
-
- private WebSocket socket;
- private bool channelBinaryMode;
- private IMessageSerializer serializer;
- private static readonly Dictionary stateDict = new Dictionary()
- {
- { WebSocketState.None, TransportState.Initialized },
- { WebSocketState.Connecting, TransportState.Connecting },
- { WebSocketState.Open, TransportState.Connected },
- { WebSocketState.Closing, TransportState.Closing },
- { WebSocketState.Closed, TransportState.Closed }
- };
-
- public string Host { get; private set; }
-
- public TransportState State
- {
- get
- {
- if( this.socket == null )
- {
- return TransportState.Initialized;
- }
- return stateDict[ this.socket.State ];
- }
- }
-
- public ITransportListener Listener { get; set; }
-
- public void Connect()
- {
- this.socket.Open();
- }
-
- public void Close()
- {
- if( this.socket == null )
- {
- return;
- }
- this.socket.Close();
- }
-
- public void Abort( string reason )
- {
- this.socket.Close( reason );
- }
-
- public void Send( ProtocolMessage message )
- {
- object serializedMessage = this.serializer.SerializeProtocolMessage(message);
-
- if( this.channelBinaryMode )
- {
- byte[] data = (byte[])serializedMessage;
- this.socket.Send( data, 0, data.Length );
- }
- else
- {
- this.socket.Send( (string)serializedMessage );
- }
- }
-
- /// Convert names+values from WebHeaderCollection into HTTP GET request arguments
- static void setQuery( UriBuilder ub, WebHeaderCollection q )
- {
- StringBuilder sb = new StringBuilder();
- for( int i = 0; i < q.Count; i++ )
- {
- string key = q.GetKey(i);
- string val = q.Get(i);
-
- if( String.IsNullOrEmpty( key ) )
- continue;
- if( sb.Length > 0 )
- sb.Append( '&' );
- sb.Append( WebUtility.UrlEncode( key ) );
- sb.Append( '=' );
- sb.Append( WebUtility.UrlEncode( val ) );
- }
- ub.Query = sb.ToString();
- }
-
- private static WebSocket CreateSocket( TransportParams parameters )
- {
- bool isTls = parameters.Options.Tls;
- string wsScheme = isTls ? "wss://" : "ws://";
- WebHeaderCollection queryCollection = new WebHeaderCollection();
- parameters.StoreParams( queryCollection );
-
- UriBuilder uriBuilder = new UriBuilder(wsScheme, parameters.Host, parameters.Port);
- setQuery( uriBuilder, queryCollection );
- WebSocket socket = new WebSocket( uriBuilder.ToString(), "", WebSocketVersion.Rfc6455 );
- return socket;
- }
-
- private void socket_Opened( object sender, EventArgs e )
- {
- if( this.Listener != null )
- {
- this.Listener.OnTransportConnected();
- }
- }
-
- private void socket_Closed( object sender, EventArgs e )
- {
- if( this.Listener != null )
- {
- this.Listener.OnTransportDisconnected();
- }
- }
-
- private void socket_Error( object sender, SuperSocket.ClientEngine.ErrorEventArgs e )
- {
- if( this.Listener != null )
- {
- this.Listener.OnTransportError( e.Exception );
- }
- }
-
- private void socket_MessageReceived( object sender, MessageReceivedEventArgs e )
- {
- if( this.Listener != null )
- {
- ProtocolMessage message = this.serializer.DeserializeProtocolMessage(e.Message);
- this.Listener.OnTransportMessageReceived( message );
- }
- }
-
- private void socket_DataReceived( object sender, DataReceivedEventArgs e )
- {
- if( this.Listener != null )
- {
- ProtocolMessage message = this.serializer.DeserializeProtocolMessage(e.Data);
- this.Listener.OnTransportMessageReceived( message );
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/IO.Ably.Platforms/Ably.net45/packages.config b/src/IO.Ably.Platforms/Ably.net45/packages.config
deleted file mode 100644
index 6d5308041..000000000
--- a/src/IO.Ably.Platforms/Ably.net45/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Shared/IO.Ably.Shared.projitems b/src/IO.Ably.Shared/IO.Ably.Shared.projitems
index c48adcd05..e74b0e002 100644
--- a/src/IO.Ably.Shared/IO.Ably.Shared.projitems
+++ b/src/IO.Ably.Shared/IO.Ably.Shared.projitems
@@ -186,8 +186,4 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Shared/JsonHelper.cs b/src/IO.Ably.Shared/JsonHelper.cs
index eb6b85a1e..31c4ed44b 100644
--- a/src/IO.Ably.Shared/JsonHelper.cs
+++ b/src/IO.Ably.Shared/JsonHelper.cs
@@ -28,6 +28,7 @@ private static JsonSerializerSettings GetJsonSettings()
},
DateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind,
NullValueHandling = NullValueHandling.Ignore,
+ MaxDepth = null, // Maintain unlimited depth behavior for backward compatibility
};
return res;
}
@@ -106,8 +107,6 @@ private static string SerializeObject(object value, Type type)
private static object DeserializeObject(string value, Type type)
{
JsonSerializer jsonSerializer = GetSerializer();
- jsonSerializer.CheckAdditionalContent = true;
-
using (JsonTextReader jsonTextReader = new JsonTextReader(new StringReader(value)))
{
return jsonSerializer.Deserialize(jsonTextReader, type);
diff --git a/src/IO.Ably.Shared/TokenDetails.cs b/src/IO.Ably.Shared/TokenDetails.cs
index 1502ea5fc..4b774def0 100644
--- a/src/IO.Ably.Shared/TokenDetails.cs
+++ b/src/IO.Ably.Shared/TokenDetails.cs
@@ -48,6 +48,7 @@ public sealed class TokenDetails
///
/// Initializes a new instance of the class.
///
+ [JsonConstructor]
public TokenDetails()
{
}
diff --git a/src/IO.Ably.Shared/TokenRequest.cs b/src/IO.Ably.Shared/TokenRequest.cs
index 0bbdc4692..f1c034369 100644
--- a/src/IO.Ably.Shared/TokenRequest.cs
+++ b/src/IO.Ably.Shared/TokenRequest.cs
@@ -17,6 +17,7 @@ public class TokenRequest
///
/// Initializes a new instance of the class.
///
+ [JsonConstructor]
public TokenRequest()
: this(Defaults.NowFunc())
{ }
diff --git a/src/IO.Ably.Shared/Types/ErrorInfo.cs b/src/IO.Ably.Shared/Types/ErrorInfo.cs
index 83b58692e..03dfa9b59 100644
--- a/src/IO.Ably.Shared/Types/ErrorInfo.cs
+++ b/src/IO.Ably.Shared/Types/ErrorInfo.cs
@@ -84,6 +84,7 @@ public class ErrorInfo
///
/// Initializes a new instance of the class.
///
+ [JsonConstructor]
public ErrorInfo()
{
}
diff --git a/src/IO.Ably.Shared/Types/Message.cs b/src/IO.Ably.Shared/Types/Message.cs
index 2ff2ce9fb..894c6b133 100644
--- a/src/IO.Ably.Shared/Types/Message.cs
+++ b/src/IO.Ably.Shared/Types/Message.cs
@@ -17,6 +17,7 @@ public class Message : IMessage
///
/// Initializes a new instance of the class.
///
+ [JsonConstructor]
public Message()
{
}
diff --git a/src/IO.Ably.Shared/app.config b/src/IO.Ably.Shared/app.config
deleted file mode 100644
index f4cce5be1..000000000
--- a/src/IO.Ably.Shared/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/IO.Ably.Shared/packages.config b/src/IO.Ably.Shared/packages.config
deleted file mode 100644
index d20012785..000000000
--- a/src/IO.Ably.Shared/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj
index 4c5436e5b..eff508212 100644
--- a/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj
+++ b/src/IO.Ably.Tests.DotNET/IO.Ably.Tests.DotNET.csproj
@@ -24,16 +24,13 @@
-
-
+
-
-
-
+
@@ -64,25 +61,25 @@
-
+
delta\1
-
+
delta\1.vcdiff
-
+
delta\2
-
+
delta\2.vcdiff
-
+
delta\3
-
+
delta\3.vcdiff
-
+
delta\4
diff --git a/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj b/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj
index ad814c579..1c7f16f63 100644
--- a/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj
+++ b/src/IO.Ably.Tests.NETFramework/IO.Ably.Tests.NETFramework.csproj
@@ -72,25 +72,25 @@
-
+
delta\1
-
+
delta\1.vcdiff
-
+
delta\2
-
+
delta\2.vcdiff
-
+
delta\3
-
+
delta\3.vcdiff
-
+
delta\4
@@ -113,14 +113,8 @@
6.2.0
-
- 15.5.180
-
-
- 4.10.1
-
- 9.0.1
+ 13.0.1
5.0.0
diff --git a/src/IO.Ably.Tests.Shared/AgentTests.cs b/src/IO.Ably.Tests.Shared/AgentTests.cs
new file mode 100644
index 000000000..a68c0336a
--- /dev/null
+++ b/src/IO.Ably.Tests.Shared/AgentTests.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Runtime.InteropServices;
+using FluentAssertions;
+using Xunit;
+
+namespace IO.Ably.Tests.Shared
+{
+ public class AgentTests
+ {
+ [Fact]
+ public void PlatformRuntime_ShouldDetectCorrectRuntime()
+ {
+ // Arrange
+ var frameworkDescription = RuntimeInformation.FrameworkDescription;
+
+ // Act
+ var platformId = IoC.PlatformId;
+
+ // Assert - verify that the platform ID matches the runtime
+ if (frameworkDescription.StartsWith(".NET 6.", StringComparison.OrdinalIgnoreCase))
+ {
+ platformId.Should().Be(Agent.PlatformRuntime.Net6, $"Expected Net6 for framework: {frameworkDescription}");
+ }
+ else if (frameworkDescription.StartsWith(".NET 7.", StringComparison.OrdinalIgnoreCase))
+ {
+ platformId.Should().Be(Agent.PlatformRuntime.Net7, $"Expected Net7 for framework: {frameworkDescription}");
+ }
+ else if (frameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase))
+ {
+ platformId.Should().Be(Agent.PlatformRuntime.Framework, $"Expected Framework for framework: {frameworkDescription}");
+ }
+ else
+ {
+ // For .NET Core 3.x, .NET 5.0, or other runtimes
+ platformId.Should().Be(Agent.PlatformRuntime.Netstandard20, $"Expected Netstandard20 for framework: {frameworkDescription}");
+ }
+ }
+
+ [Fact]
+ public void DotnetRuntimeIdentifier_ShouldIncludeCorrectRuntimeName()
+ {
+ // Arrange & Act
+ var runtimeIdentifier = Agent.DotnetRuntimeIdentifier();
+
+ // Assert
+ runtimeIdentifier.Should().NotBeNullOrEmpty();
+ var platformId = IoC.PlatformId;
+
+ switch (platformId)
+ {
+ case Agent.PlatformRuntime.Net6:
+ runtimeIdentifier.Should().StartWith("dotnet6/");
+ break;
+ case Agent.PlatformRuntime.Net7:
+ runtimeIdentifier.Should().StartWith("dotnet7/");
+ break;
+ case Agent.PlatformRuntime.Framework:
+ runtimeIdentifier.Should().StartWith("dotnet-framework/");
+ break;
+ case Agent.PlatformRuntime.Netstandard20:
+ runtimeIdentifier.Should().NotBeNullOrEmpty();
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+ }
+}
diff --git a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems
index bfbf3889a..2eace096f 100644
--- a/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems
+++ b/src/IO.Ably.Tests.Shared/IO.Ably.Tests.Shared.projitems
@@ -11,6 +11,7 @@
+
diff --git a/src/IO.Ably.Tests.Shared/Realtime/RealtimeSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/RealtimeSpecs.cs
index 9760c9288..83056066e 100644
--- a/src/IO.Ably.Tests.Shared/Realtime/RealtimeSpecs.cs
+++ b/src/IO.Ably.Tests.Shared/Realtime/RealtimeSpecs.cs
@@ -136,9 +136,9 @@ public void New_Realtime_HasAuth()
public void AutomaticNetworkDetectionCanBeDisabledByClientOption(bool enabled)
{
// Because this test depends on static state in the 'Platform' type we need
- // to (re)Initialize the static 'Platform' state before each test run.
+ // to reset the static 'Platform' state before each test run.
- Platform.Initialize();
+ Platform.HookedUpToNetworkEvents = false;
_ = new AblyRealtime(new ClientOptions(ValidKey)
{
diff --git a/src/delta-test-messages/1 b/src/IO.Ably.Tests.Shared/delta-test-messages/1
similarity index 100%
rename from src/delta-test-messages/1
rename to src/IO.Ably.Tests.Shared/delta-test-messages/1
diff --git a/src/delta-test-messages/1.vcdiff b/src/IO.Ably.Tests.Shared/delta-test-messages/1.vcdiff
similarity index 100%
rename from src/delta-test-messages/1.vcdiff
rename to src/IO.Ably.Tests.Shared/delta-test-messages/1.vcdiff
diff --git a/src/delta-test-messages/2 b/src/IO.Ably.Tests.Shared/delta-test-messages/2
similarity index 100%
rename from src/delta-test-messages/2
rename to src/IO.Ably.Tests.Shared/delta-test-messages/2
diff --git a/src/delta-test-messages/2.vcdiff b/src/IO.Ably.Tests.Shared/delta-test-messages/2.vcdiff
similarity index 100%
rename from src/delta-test-messages/2.vcdiff
rename to src/IO.Ably.Tests.Shared/delta-test-messages/2.vcdiff
diff --git a/src/delta-test-messages/3 b/src/IO.Ably.Tests.Shared/delta-test-messages/3
similarity index 100%
rename from src/delta-test-messages/3
rename to src/IO.Ably.Tests.Shared/delta-test-messages/3
diff --git a/src/delta-test-messages/3.vcdiff b/src/IO.Ably.Tests.Shared/delta-test-messages/3.vcdiff
similarity index 100%
rename from src/delta-test-messages/3.vcdiff
rename to src/IO.Ably.Tests.Shared/delta-test-messages/3.vcdiff
diff --git a/src/delta-test-messages/4 b/src/IO.Ably.Tests.Shared/delta-test-messages/4
similarity index 100%
rename from src/delta-test-messages/4
rename to src/IO.Ably.Tests.Shared/delta-test-messages/4
diff --git a/src/IO.Ably.Xamarin/Class1.cs b/src/IO.Ably.Xamarin/Class1.cs
deleted file mode 100644
index 8d0be1d81..000000000
--- a/src/IO.Ably.Xamarin/Class1.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace IO.Ably.Xamarin
-{
- public class Class1
- {
- }
-}
diff --git a/src/IO.Ably.Xamarin/IO.Ably.Xamarin.csproj b/src/IO.Ably.Xamarin/IO.Ably.Xamarin.csproj
deleted file mode 100644
index e824c6bb2..000000000
--- a/src/IO.Ably.Xamarin/IO.Ably.Xamarin.csproj
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- 10.0
- Debug
- AnyCPU
- {BFF0CE84-BA48-403C-BC69-EEAA09A8C91D}
- Library
- Properties
- IO.Ably.Xamarin
- IO.Ably.Xamarin
- en-US
- 512
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Profile24
- v4.0
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/IO.Ably.Xamarin/Properties/AssemblyInfo.cs b/src/IO.Ably.Xamarin/Properties/AssemblyInfo.cs
deleted file mode 100644
index e1dd0efaa..000000000
--- a/src/IO.Ably.Xamarin/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Resources;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("IO.Ably.Xamarin")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("IO.Ably.Xamarin")]
-[assembly: AssemblyCopyright("Copyright © 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: NeutralResourcesLanguage("en")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/IO.Ably.iOS/IO.Ably.iOS.csproj b/src/IO.Ably.iOS/IO.Ably.iOS.csproj
index 20311fc18..1bfbaf99d 100644
--- a/src/IO.Ably.iOS/IO.Ably.iOS.csproj
+++ b/src/IO.Ably.iOS/IO.Ably.iOS.csproj
@@ -70,8 +70,8 @@
..\packages\MsgPack.Cli.0.9.2\lib\Xamarin.iOS10\MsgPack.dll
-
- ..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll
True
diff --git a/src/IO.Ably.iOS/packages.config b/src/IO.Ably.iOS/packages.config
index 765c8610b..ff1cf0904 100644
--- a/src/IO.Ably.iOS/packages.config
+++ b/src/IO.Ably.iOS/packages.config
@@ -7,7 +7,7 @@
-
+
diff --git a/src/packages/repositories.config b/src/packages/repositories.config
deleted file mode 100644
index fe397eda9..000000000
--- a/src/packages/repositories.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file