-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Microservices Communication in .NET Using gRPC
By :

Answer the following questions to test your knowledge of this chapter:
A. In Protobuf, a service is defined by the service
keyword, while its methods are defined by the rpc
keyword.
B. You cannot have a Protobuf message definition without any fields.
C. A Protobuf message can have collections of objects and can use other message definitions as field types.
D. You have to specify a request object in a response object inside a gRPC method definition and you can only use a single object type in each of those.
A. Windows, Linux, and macOS
B. Windows and macOS only
C. Unix-based (macOS and Linux) only
D. Windows only
A. So long as you reference the Grpc.AspNetCore
NuGet package, it will be automatically enabled for you.
B. You just need to add a proto file to your project; the compiler will do everything else for you.
C. You need to define a proto element inside the project file. It can be blank or you can set its GrpcServices
attribute to either Server
or Both
.
D. You need to define a proto element inside the project file and you must set its GrpcServices
attribute to Server
.
A. You just need to override the methods from the auto-generated C# code files with your functionality.
B. You need to modify the auto-generated C# classes and add your functionality to them.
C. You need to create a new class that inherits from the auto-generated base class, add gRPC to your application services via the ConfigureServices
method of the Startup
class, and then register the newly created class as one of the endpoints in your middleware.
D. The system will generate all the required code for you. You just need to fill the methods with your logic.
A. It can only call methods synchronously.
B. It can only call methods asynchronously.
C. There is both a synchronous and asynchronous version of each method that's generated for the client to use.
D. All auto-generated methods are asynchronous, but you can change the implementation to make them synchronous.