Show / Hide Table of Contents

    Class TestServerCallContext

    Creates test doubles for ServerCallContext.

    Inheritance
    System.Object
    TestServerCallContext
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Grpc.Core.Testing
    Assembly: Grpc.Core.Testing.dll
    Syntax
    public static class TestServerCallContext

    Methods

    Create(String, String, DateTime, Metadata, CancellationToken, String, AuthContext, ContextPropagationToken, Func<Metadata, Task>, Func<WriteOptions>, Action<WriteOptions>)

    Creates a test double for ServerCallContext. Only for testing. Note: experimental API that can change or be removed without any prior notice.

    Declaration
    public static ServerCallContext Create(string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, string peer, AuthContext authContext, ContextPropagationToken contextPropagationToken, Func<Metadata, Task> writeHeadersFunc, Func<WriteOptions> writeOptionsGetter, Action<WriteOptions> writeOptionsSetter)
    Parameters
    Type Name Description
    System.String method
    System.String host
    System.DateTime deadline
    Metadata requestHeaders
    System.Threading.CancellationToken cancellationToken
    System.String peer
    AuthContext authContext
    ContextPropagationToken contextPropagationToken
    System.Func<Metadata, System.Threading.Tasks.Task> writeHeadersFunc
    System.Func<WriteOptions> writeOptionsGetter
    System.Action<WriteOptions> writeOptionsSetter
    Returns
    Type Description
    ServerCallContext
    Back to top Generated by DocFX