Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

BasicCalculator

A migration of a very simple request/response service, using the Calculator sample from the Basic\GettingStarted\GettingStarted\CS\GettingStarted.sln folder in the WCF Samples.

This solution demonstrates the generation of the .proto file from a ServiceContract, and the generated gRPC service implementation that maps to a copy of the original service implementation.

It also includes a generated client wrapper that matches the interface of the original WCF-generated client, which can be used in client applications to make switching to the new gRPC service easier. The client library targets both .NET 4.5 and .NET Standard 2.1, so you can use it in legacy .NET Framework applications as well as with Windows Forms or WPF apps you've upgraded to .NET Core 3.1. For brand new .NET Core 3.1 apps, of course, we recommend using the .proto file directly to generate your own client.

The BasicCalculatorCore and BasicCalculatorCore.Client projects were entirely generated by Visual ReCode and have not been modified in any way. The service project was automatically copied from the WCF source solution and converted to a .NET Standard 2.1 project, and has also not been modified in any way.

The ClientApp .NET Core 3.1 console project was created by hand with most of the code in the Program.Main method copied and pasted from the client project in the source application to demonstrate the backward-compatible client feature.