Releases: CXuesong/JsonRpc.Standard
Releases · CXuesong/JsonRpc.Standard
v0.5.4
- Use
DisposeAsync
across the libraries since .NET Standard 2.1 (.NET Core 3.0).
CXuesong.JsonRpc.AspNetCore
- Use asynchronous overloads to access HTTP request/response (#13)
- Thus ASP.NET Core 3+ will not complain about you are using synchronous HTTP stream overloads.
- You will not need to enable
AllowSynchronousIO
in your config.
- Use HTTP 200 status code for error JSON RPC response. (#14)
- Library consumer can still derive from
AspNetCoreRpcServerHandler
and override AspNetCoreRpcServerHandler.GetStatusCodeFromResponse to customize the status code mapping.
- Library consumer can still derive from
v0.5.3
v0.5.2
v0.5.1
v0.5.0
Bug fix
- Take the reader/writer semaphore only once in
ByLineTextMessageReader.Dispose
andByLineTextMessageWriter.Dispose
to prevent 1s delay. (#8)
Major changes
- Renamed package
JsonRpc.Standard
toJsonRpc.Commons
.- This is what I wanted since 2018.
- Renamed namespace
JsonRpc.Standard.xxx
toJsonRpc.xxx
.- Moved
Message
and related classes intoJsonRpc.Messages
namespace.
- Moved
- Enabled Source Link support. You should be able to see source code downloaded from GitHub when debugging into
JsonRpc.Standard
library.
v0.4.3
- Use SHFB to cleanup the XML documentation so you will have better intellisence experience when consuming the following packages.
JsonRpc.WebSockets
- Introduce JsonRpc.WebSockets! Now you may either serve JSON-RPC services or make JSON-RPC calls over WebSocket. (#6)
JsonRpc.Streams
- Fixed a bug that may cause
StreamRpcServerHandlerOptions.ConsistentResponseSequence
actually having no effect. - Reduced
ObjectDisposedExceptions
that may raise if
there is another Exception (e.g.TaskCancelledException
) triggered whileMessageReader
is pulling the JSON-RPC message.
JsonRpc.AspNetCore
- Make
AspNetCoreFeature
public.
v0.4.2
v0.4.1
ClrExceptionErrorData.FromException
supports opt-out stack trace,- However, the default (and un-configurable) behavior of
JsonRpcServiceHost
is to include the stack trace.
- However, the default (and un-configurable) behavior of
ClrExceptionErrorData FromException
can automatically flattenJsonRpcRemoteException.RemoteException
as itsInnerException
- This can be helpful to maintain as much information as we can, especially when we are relaying JSON RPC operations through the channels.
ByLineTextMessageReader
/ByLineTextMessageWriter
will wait for the ongoing asynchronous operation to finish before disposing its underlyingStreamReader
/StreamWriter
.- This can reduce the chance of meeting
InvalidOperationException
on disposal.
- This can reduce the chance of meeting
v0.4.0
SingleFeatureCollection.Get<T>
should accept feature queries of base type ofT
aside fromT
itself.
The following packages have not been changed since the last release, thus are not included in this version of release.
- CXuesong.JsonRpc.AspNetCore
- CXuesong.JsonRpc.Http
v0.4-int0
- Applied
[Serializable]
and[SecurityCritical]
attributes on exception classes.
Contracts
- Server-side by-position argument support. See
JsonRpcMethodBinder.TryBindToMethod
. (#3) - Added
IJsonRpcMethodBinder.BindParameters
andIJsonRpcRequestMarshaler
to convert the CLR method arguments from/to JSON RPC request arguments.- Thus removed
JsonRpcMethod.Marshal
andJsonRpcMethod.UnmarshalArguments
- Thus removed
- Added
IsOptional
andDefaultValue
properties inJsonRpcParameterAttribute
. You may specify a CLR parameter is optional via attribute without putting it to the back of the argument list now. See the usage demo inTestJsonRpcService.cs
.
Server
- Now
undefined
argument value in the JSON RPC request will be treated as "missing", i.e. default value of the corresponding parameter is used. Note the missing item in the JSON array (e.g.[1, 2, , 3]
) is treated asundefined
.
JsonRpcProxyBuilder
- Moved
JsonRpcProxyBuilder
into a separate packageCXuesong.JsonRpc.DynamicProxy
. - Now you can use the proxy builder to implement the abstract methods (attributed with
JsonRpcMethodAttribute
) in an abstract class. - Add
MessageReaderException
, which are intended to be thrown byMessageReader
implementations. They used to throwJsonRpcException
, which is incorrect. - Invoke-and-forget for client-side notifications implementation.
- This could reduce the chance of deadlocks caused by sync-wait in async method body.
Notes
The following packages have not been changed since the last release, thus are not included in this version of release.
- CXuesong.JsonRpc.AspNetCore
- CXuesong.JsonRpc.Http