Show / Hide Table of Contents

    Class ServerCallContextExtensions

    Extension methods for ServerCallContext.

    Inheritance
    System.Object
    ServerCallContextExtensions
    Namespace: Grpc.Core
    Assembly: Grpc.AspNetCore.Server.dll
    Syntax
    public static class ServerCallContextExtensions : object

    Methods

    GetHttpContext(ServerCallContext)

    Retrieve the from a if possible. Note that read-only access is recommended as changes to the HttpContext is not synchronized with the ServerCallContext. The HttpContext is only available when using gRPC with ASP.NET Core.

    Declaration
    public static HttpContext GetHttpContext(this ServerCallContext serverCallContext)
    Parameters
    Type Name Description
    ServerCallContext serverCallContext

    The to extract from.

    Returns
    Type Description
    HttpContext

    The extracted . If it cannot be extracted, an error will be thrown.

    Back to top Generated by DocFX