Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
Greeter/ | 23-Nov-2023 | - | 482 | 341 | ||
GreeterClient/ | 23-Nov-2023 | - | 56 | 33 | ||
GreeterServer/ | 23-Nov-2023 | - | 69 | 44 | ||
Greeter.sln | D | 23-Nov-2023 | 1.9 KiB | 35 | 33 | |
README.md | D | 23-Nov-2023 | 1.1 KiB | 50 | 33 | |
generate_protos.bat | D | 23-Nov-2023 | 1.1 KiB | 29 | 22 |
README.md
1gRPC in 3 minutes (C#) 2======================== 3 4BACKGROUND 5------------- 6For this sample, we've already generated the server and client stubs from [helloworld.proto][]. 7 8Example projects in this directory depend on the [Grpc](https://www.nuget.org/packages/Grpc/) 9and [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) NuGet packages 10which have been already added to the project for you. 11 12PREREQUISITES 13------------- 14 15- The [.NET Core SDK 2.1+](https://www.microsoft.com/net/core) 16 17You can also build the example directly using Visual Studio 2017, but it's not a requirement. 18 19BUILD 20------- 21 22From the `examples/csharp/Helloworld` directory: 23 24- `dotnet build Greeter.sln` 25 26Try it! 27------- 28 29- Run the server 30 31 ``` 32 > cd GreeterServer 33 > dotnet run -f netcoreapp2.1 34 ``` 35 36- Run the client 37 38 ``` 39 > cd GreeterClient 40 > dotnet run -f netcoreapp2.1 41 ``` 42 43Tutorial 44-------- 45 46You can find a more detailed tutorial about Grpc in [gRPC Basics: C#][] 47 48[helloworld.proto]:../../protos/helloworld.proto 49[gRPC Basics: C#]:https://grpc.io/docs/tutorials/basic/csharp.html 50