[英]Hosting gRPC service in a Windows Forms Application
I want to create a gRPC service but I need to host in a winform .net application.我想创建一个 gRPC 服务,但我需要在一个 winform .net 应用程序中托管。 there is an extraordinary example of how Hosting ASP.NET Core API in a Windows Forms Application I would like someone to explain to me, what I need to install and what I should change in that example, to host a grpc service in the form of Windows ...
有一个关于如何在 Windows 窗体应用程序中托管 ASP.NET Core API的非凡示例,我希望有人向我解释,在该示例中我需要安装什么以及我应该更改什么,以便以以下形式托管 grpc 服务窗户...
You could follow the same steps but with several additional:您可以遵循相同的步骤,但有几个额外的步骤:
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<MygRPCService>();
});
rpc Get(GetRequest) returns (GetReply) {
option (google.api.http) = {
get: '/my-endpoint'
body: '*'
};
}
services.AddGrpc();
services.AddGrpcHttpApi();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.