grpc / grpc-dotnet

gRPC for .NET
Apache License 2.0
4.17k stars 766 forks source link

split method in ServerCallContext to service and method #2477

Open careless6666 opened 2 months ago

careless6666 commented 2 months ago

Now if you try access to method name from context you will see only full name and no way to get access separately to Name and ServiceceName fields, only through access private filed _method (part of JsonTranscodingServerCallContext) https://github.com/dotnet/aspnetcore/blob/98c4546ddccfe2f62c4dc239fabd0c92848b255d/src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Internal/JsonTranscodingServerCallContext.cs#L23

Is it possible to make _method public?

Screenshot 2024-07-03 at 10 54 47 AM
careless6666 commented 2 months ago
Screenshot 2024-07-11 at 2 45 48 PM

In HttpContextServerCallContext is is too impossible extract separated method and service name info, in golang it is work