parent
c45b79f7b3
commit
1cee6a9bbf
|
@ -4,7 +4,7 @@ author: juntaoluo
|
|||
description: This tutorial shows how to create a gRPC Service and gRPC client on ASP.NET Core. Learn how to create a gRPC Service project, edit a proto file, and add a duplex streaming call.
|
||||
monikerRange: '>= aspnetcore-3.0'
|
||||
ms.author: johluo
|
||||
ms.date: 5/30/2019
|
||||
ms.date: 06/05/2019
|
||||
uid: tutorials/grpc/grpc-start
|
||||
---
|
||||
# Tutorial: Create a gRPC client and server in ASP.NET Core
|
||||
|
@ -224,7 +224,7 @@ dotnet add GrpcGreeterClient.csproj package Grpc.Tools
|
|||
|
||||
Build the client project to trigger the generation of the C# client assets.
|
||||
|
||||
### Create the greater client
|
||||
### Create the Greeter client
|
||||
|
||||
Build the project to create the types in the **Greeter** namespace. The `Greeter` types are generated automatically by the build process.
|
||||
|
||||
|
@ -234,14 +234,14 @@ Update the gRPC client *Program.cs* file with the following code:
|
|||
|
||||
*Program.cs* contains the entry point and logic for the gRPC client.
|
||||
|
||||
The greater client is created by:
|
||||
The Greeter client is created by:
|
||||
|
||||
* Instantiating a `Channel` containing the information for creating the connection to the gRPC service.
|
||||
* Using the `Channel` to construct the greater client:
|
||||
* Using the `Channel` to construct the Greeter client:
|
||||
|
||||
[!code-cs[](~/tutorials/grpc/grpc-start/sample/GrpcGreeterClient/Program.cs?name=snippet&highlight=4-6)]
|
||||
|
||||
The greater client calls the asynchronous `SayHello` method. The result of the `SayHello` call is displayed:
|
||||
The Greeter client calls the asynchronous `SayHello` method. The result of the `SayHello` call is displayed:
|
||||
|
||||
[!code-cs[](~/tutorials/grpc/grpc-start/sample/GrpcGreeterClient/Program.cs?name=snippet&highlight=7-9)]
|
||||
|
||||
|
|
Loading…
Reference in New Issue