public delegate Task<TResponse> UnaryServerMethod<TRequest, TResponse>(TRequest request, ServerCallContext context) where TRequest : class where TResponse : class
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eUnaryServerMethod\u003c/code\u003e is a server-side handler delegate for unary calls within the gRPC framework.\u003c/p\u003e\n"],["\u003cp\u003eIt takes a request of type \u003ccode\u003eTRequest\u003c/code\u003e and a \u003ccode\u003eServerCallContext\u003c/code\u003e as input.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a \u003ccode\u003eTask\u003c/code\u003e of type \u003ccode\u003eTResponse\u003c/code\u003e, which represents the asynchronous response to the request.\u003c/p\u003e\n"],["\u003cp\u003eThis delegate is defined within the \u003ccode\u003eGrpc.Core\u003c/code\u003e namespace and is part of the \u003ccode\u003eGrpc.Core.Api.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTRequest\u003c/code\u003e and \u003ccode\u003eTResponse\u003c/code\u003e parameters specify the types of the request and response messages, respectively, and both must be class types.\u003c/p\u003e\n"]]],[],null,["# Delegate UnaryServerMethod<TRequest, TResponse> (2.66.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.66.0 (latest)](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.UnaryServerMethod-2)\n- [2.63.0](/dotnet/docs/reference/Grpc.Core/2.63.0/Grpc.Core.UnaryServerMethod-2)\n- [2.48.0](/dotnet/docs/reference/Grpc.Core/2.48.0/Grpc.Core.UnaryServerMethod-2) \n\n public delegate Task\u003cTResponse\u003e UnaryServerMethod\u003cTRequest, TResponse\u003e(TRequest request, ServerCallContext context) where TRequest : class where TResponse : class\n\nServer-side handler for unary call.\n\nNamespace\n---------\n\n[Grpc.Core](/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core)\n\nAssembly\n--------\n\nGrpc.Core.Api.dll"]]