csredis icon indicating copy to clipboard operation
csredis copied to clipboard

Adding support for .NET Core

Open aclemmensen opened this issue 9 years ago • 1 comments

This branch attempts at a conversion of the library to .NET Core with project.json/xproj files. I'm motivated to do this because another library I use (Disque.Net) uses this library, and converting this to .NET Core is a blocker in getting Disque.Net over.

The primary issues I've had in the conversion was the dependency on System.Runtime.Serialization, but as it turned out the only real dependency in that namespace was FormatterConverter, and all it contains is a bunch of calls to System.Convert which, thankfully, is available on Core.

I updated the test project to be a Core project as well, and all the tests are passing.

The only contract level change I had to make that may affect consumers is that IRedisSocket now returns a Task<Stream> instead of a Stream in the GetStream method. This is to accommodate SslStream which now only exposes an async method for authenticating.

The other potentially troublesome change I made is that the relationship between OnConnected and OnAsyncConnected on RedisConnector has been inverted to account for the change described above.

I also had to disable strong-name signing of the assemblies to get the tests to run locally.

aclemmensen avatar Nov 27 '16 18:11 aclemmensen

nice work

tonyqus avatar Oct 17 '20 15:10 tonyqus