ServiceModel.Grpc.MemoryPackMarshaller
1.21.0
dotnet add package ServiceModel.Grpc.MemoryPackMarshaller --version 1.21.0
NuGet\Install-Package ServiceModel.Grpc.MemoryPackMarshaller -Version 1.21.0
<PackageReference Include="ServiceModel.Grpc.MemoryPackMarshaller" Version="1.21.0" />
<PackageVersion Include="ServiceModel.Grpc.MemoryPackMarshaller" Version="1.21.0" />
<PackageReference Include="ServiceModel.Grpc.MemoryPackMarshaller" />
paket add ServiceModel.Grpc.MemoryPackMarshaller --version 1.21.0
#r "nuget: ServiceModel.Grpc.MemoryPackMarshaller, 1.21.0"
#:package ServiceModel.Grpc.MemoryPackMarshaller@1.21.0
#addin nuget:?package=ServiceModel.Grpc.MemoryPackMarshaller&version=1.21.0
#tool nuget:?package=ServiceModel.Grpc.MemoryPackMarshaller&version=1.21.0
ServiceModel.Grpc.MemoryPackMarshaller
ServiceModel.Grpc enables applications to communicate with gRPC services using a code-first approach (no .proto files), helps to get around limitations of gRPC protocol like "only reference types", "exact one input", "no nulls", "no value-types". Provides exception handling. Helps to migrate existing WCF solution to gRPC with minimum effort.
ServiceModel.Grpc.MemoryPackMarshaller is package with IMarshallerFactory implementation, based on MemoryPack serializer.
Configure ClientFactory
Instruct ClientFactory to use MemoryPackMarshallerFactory as default marshaller for all clients.
IClientFactory defaultClientFactory
= new ClientFactory(new ServiceModelGrpcClientOptions
{
// set MemoryPackMarshaller as default Marshaller
MarshallerFactory = MemoryPackMarshallerFactory.Default
});
Instruct ClientFactory to use MemoryPackMarshallerFactory for concrete client.
// client factory with default (DataContractMarshallerFactory) marshaller
IClientFactory defaultClientFactory = new ClientFactory();
// set MemoryPackMarshaller only for ICalculator client
defaultClientFactory.AddClient<ICalculator>(options =>
{
options.MarshallerFactory = MemoryPackMarshallerFactory.Default;
});
Configure ServiceModel.Grpc.AspNetCore
Instruct ServiceModel.Grpc code-first to use MemoryPackMarshallerFactory as default marshaller for all endpoints.
var builder = WebApplication.CreateBuilder();
// enable ServiceModel.Grpc code-first
builder.Services.AddServiceModelGrpc(options =>
{
// set MemoryPackMarshaller as default Marshaller
options.DefaultMarshallerFactory = MemoryPackMarshallerFactory.Default;
});
Instruct ServiceModel.Grpc code-first to use MemoryPackMarshallerFactory for concrete endpoint.
var builder = WebApplication.CreateBuilder();
// enable ServiceModel.Grpc code-first with default (DataContractMarshallerFactory) marshaller
builder.Services.AddServiceModelGrpc();
// set MemoryPackMarshaller only for Calculator endpoint
builder.Services.AddServiceModelGrpcServiceOptions<Calculator>(options =>
{
options.MarshallerFactory = MemoryPackMarshallerFactory.Default;
});
Configure ServiceModel.Grpc.SelfHost
Instruct ServiceModel.Grpc code-first to use MemoryPackMarshallerFactory.
var server = new Grpc.Core.Server();
// set MemoryPackMarshaller for Calculator endpoint
server.Services.AddServiceModelTransient(
()=> new Calculator(),
options =>
{
options.MarshallerFactory = MemoryPackMarshallerFactory.Default;
});
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- MemoryPack (>= 1.21.4)
- ServiceModel.Grpc (>= 1.21.0)
- ServiceModel.Grpc.DesignTime (>= 1.21.0)
-
net10.0
- MemoryPack (>= 1.21.4)
- ServiceModel.Grpc (>= 1.21.0)
- ServiceModel.Grpc.DesignTime (>= 1.21.0)
-
net8.0
- MemoryPack (>= 1.21.4)
- ServiceModel.Grpc (>= 1.21.0)
- ServiceModel.Grpc.DesignTime (>= 1.21.0)
-
net9.0
- MemoryPack (>= 1.21.4)
- ServiceModel.Grpc (>= 1.21.0)
- ServiceModel.Grpc.DesignTime (>= 1.21.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.21.0 | 39 | 12/21/2025 |
| 1.20.0 | 183 | 11/23/2025 |
| 1.19.0 | 206 | 11/9/2025 |
| 1.18.0 | 193 | 10/2/2025 |
| 1.17.0 | 200 | 8/31/2025 |
| 1.16.0 | 187 | 6/29/2025 |
| 1.15.0 | 203 | 6/15/2025 |
| 1.14.0 | 203 | 4/18/2025 |
| 1.13.0 | 154 | 2/2/2025 |
| 1.12.0 | 137 | 1/12/2025 |
| 1.11.1 | 143 | 11/30/2024 |
| 1.11.0 | 157 | 11/23/2024 |
| 1.10.1 | 179 | 10/19/2024 |