MessagePack protocol preview.1 (5.10.0 + AspNetCore 1.6.0)
Pre-release
Pre-release
·
1 commit
to main
since this release
AspNetCore 1.6.0
- Added MessagePack wire-format support (
application/vnd.msgpack) via #591
Enable MessagePack on the server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOpenRiaServices()
.AddMessagePackSerialization();Optionally pass a custom Nerdbank.MessagePack.MessagePackSerializer to add converters or a custom comparer provider:
builder.Services.AddOpenRiaServices()
.AddMessagePackSerialization(opt =>
{
opt.Serializer = new Nerdbank.MessagePack.MessagePackSerializer()
{
// custom converters / comparer provider
};
});Client (OpenRiaServices.Client.DomainClients.Http)
- Added
MessagePackHttpDomainClientFactory— aDomainClientFactorythat communicates with the server using MessagePack over HTTP
Enable MessagePack on the client
DomainContext.DomainClientFactory =
new MessagePackHttpDomainClientFactory(baseUri, httpClientFactory);Optionally pass a custom serializer:
var serializer = new MessagePackSerializer()
{
// custom converters / comparer provider
};
DomainContext.DomainClientFactory =
new MessagePackHttpDomainClientFactory(baseUri, httpClientFactory, serializer);For performance benchmark data see PR #591.
What's Changed
- Add new transport based on MessagePack by @Daniel-Svensson in #591