ServiceModel.Grpc.ProtoBufMarshaller
1.11.0
See the version list below for details.
dotnet add package ServiceModel.Grpc.ProtoBufMarshaller --version 1.11.0
NuGet\Install-Package ServiceModel.Grpc.ProtoBufMarshaller -Version 1.11.0
<PackageReference Include="ServiceModel.Grpc.ProtoBufMarshaller" Version="1.11.0" />
paket add ServiceModel.Grpc.ProtoBufMarshaller --version 1.11.0
#r "nuget: ServiceModel.Grpc.ProtoBufMarshaller, 1.11.0"
// Install ServiceModel.Grpc.ProtoBufMarshaller as a Cake Addin #addin nuget:?package=ServiceModel.Grpc.ProtoBufMarshaller&version=1.11.0 // Install ServiceModel.Grpc.ProtoBufMarshaller as a Cake Tool #tool nuget:?package=ServiceModel.Grpc.ProtoBufMarshaller&version=1.11.0
ServiceModel.Grpc.ProtoBufMarshaller
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.ProtoBufMarshaller
is package with IMarshallerFactory
implementation, based on protobuf-net serializer.
Configure ClientFactory
Instruct ClientFactory
to use ProtobufMarshallerFactory
as default marshaller for all clients.
IClientFactory defaultClientFactory
= new ClientFactory(new ServiceModelGrpcClientOptions
{
// set ProtobufMarshaller as default Marshaller
MarshallerFactory = ProtobufMarshallerFactory.Default
});
Instruct ClientFactory
to use ProtobufMarshallerFactory
for concrete client.
// client factory with default (DataContractMarshallerFactory) marshaller
IClientFactory defaultClientFactory = new ClientFactory();
// set ProtobufMarshaller only for ICalculator client
defaultClientFactory.AddClient<ICalculator>(options =>
{
options.MarshallerFactory = ProtobufMarshallerFactory.Default;
});
Configure ServiceModel.Grpc.AspNetCore
Instruct ServiceModel.Grpc code-first to use ProtobufMarshallerFactory
as default marshaller for all endpoints.
var builder = WebApplication.CreateBuilder();
// enable ServiceModel.Grpc code-first
builder.Services.AddServiceModelGrpc(options =>
{
// set ProtobufMarshaller as default Marshaller
options.DefaultMarshallerFactory = ProtobufMarshallerFactory.Default;
});
Instruct ServiceModel.Grpc code-first to use ProtobufMarshallerFactory
for concrete endpoint.
var builder = WebApplication.CreateBuilder();
// enable ServiceModel.Grpc code-first with default (DataContractMarshallerFactory) marshaller
builder.Services.AddServiceModelGrpc();
// set ProtobufMarshaller only for Calculator endpoint
builder.Services.AddServiceModelGrpcServiceOptions<Calculator>(options =>
{
options.MarshallerFactory = ProtobufMarshallerFactory.Default;
});
Configure ServiceModel.Grpc.SelfHost
Instruct ServiceModel.Grpc code-first to use ProtobufMarshallerFactory
.
var server = new Grpc.Core.Server();
// set ProtobufMarshaller for Calculator endpoint
server.Services.AddServiceModelTransient(
()=> new Calculator(),
options =>
{
options.MarshallerFactory = ProtobufMarshallerFactory.Default;
});
Links
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
-
.NETStandard 2.0
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
-
.NETStandard 2.1
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
-
net6.0
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
-
net8.0
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
-
net9.0
- protobuf-net (>= 3.2.45)
- ServiceModel.Grpc (>= 1.11.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ServiceModel.Grpc.ProtoBufMarshaller:
Package | Downloads |
---|---|
MF40.Silo
Orleans Silo |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.11.1 | 238 | 11/30/2024 |
1.11.0 | 1,668 | 11/23/2024 |
1.10.1 | 3,419 | 10/19/2024 |
1.9.1 | 1,864 | 9/29/2024 |
1.9.0 | 4,724 | 7/21/2024 |
1.8.3 | 3,672 | 5/18/2024 |
1.8.2 | 1,107 | 3/2/2024 |
1.8.1 | 974 | 2/13/2024 |
1.8.0 | 1,949 | 1/7/2024 |
1.7.0 | 153 | 12/24/2023 |
1.6.1 | 6,163 | 11/25/2023 |
1.6.0 | 2,144 | 9/9/2023 |
1.5.2 | 679 | 6/25/2023 |
1.5.1 | 15,277 | 5/1/2023 |
1.5.0 | 927 | 3/7/2023 |
1.4.13 | 432 | 12/19/2022 |
1.4.12 | 399 | 11/19/2022 |
1.4.11 | 435 | 10/23/2022 |
1.4.10 | 1,446 | 8/14/2022 |
1.4.9 | 553 | 7/23/2022 |
1.4.8 | 587 | 5/29/2022 |
1.4.7 | 499 | 5/21/2022 |
1.4.6 | 1,633 | 4/3/2022 |
1.4.5 | 472 | 3/26/2022 |
1.4.4 | 527 | 3/12/2022 |
1.4.3 | 499 | 2/5/2022 |
1.4.2 | 537 | 1/22/2022 |
1.4.1 | 338 | 1/8/2022 |
1.4.0 | 2,543 | 11/26/2021 |
1.3.2 | 389 | 11/5/2021 |
1.3.1 | 2,606 | 10/10/2021 |
1.3.0 | 497 | 7/31/2021 |
1.2.1 | 556 | 6/12/2021 |
1.2.0 | 444 | 6/6/2021 |
1.1.9 | 412 | 5/8/2021 |
1.1.8 | 581 | 3/28/2021 |
1.1.7 | 469 | 1/3/2021 |
1.1.6 | 436 | 12/13/2020 |
1.1.5 | 431 | 11/21/2020 |
1.1.4 | 545 | 10/11/2020 |
1.1.3 | 621 | 9/13/2020 |
1.1.2 | 478 | 8/26/2020 |
1.1.1 | 498 | 6/21/2020 |
1.1.0 | 519 | 5/10/2020 |
1.0.1 | 522 | 5/1/2020 |
1.0.0 | 540 | 4/23/2020 |
1.0.0-pre2 | 388 | 4/18/2020 |