Show / Hide Table of Contents

    Class Marshallers

    Utilities for creating marshallers.

    Inheritance
    System.Object
    Marshallers
    Namespace: Grpc.Core
    Assembly: Grpc.Core.Api.dll
    Syntax
    public static class Marshallers : object

    Properties

    StringMarshaller

    Returns a marshaller for string type. This is useful for testing.

    Declaration
    public static Marshaller<string> StringMarshaller { get; }
    Property Value
    Type Description
    Marshaller<System.String>

    Methods

    Create<T>(Action<T, SerializationContext>, Func<DeserializationContext, T>)

    Creates a marshaller from specified contextual serializer and deserializer. Note: This method is part of an experimental API that can change or be removed without any prior notice.

    Declaration
    public static Marshaller<T> Create<T>(Action<T, SerializationContext> serializer, Func<DeserializationContext, T> deserializer)
    Parameters
    Type Name Description
    Action<T, SerializationContext> serializer
    Func<DeserializationContext, T> deserializer
    Returns
    Type Description
    Marshaller<T>
    Type Parameters
    Name Description
    T

    Create<T>(Func<T, Byte[]>, Func<Byte[], T>)

    Creates a marshaller from specified serializer and deserializer.

    Declaration
    public static Marshaller<T> Create<T>(Func<T, byte[]> serializer, Func<byte[], T> deserializer)
    Parameters
    Type Name Description
    Func<T, System.Byte[]> serializer
    Func<System.Byte[], T> deserializer
    Returns
    Type Description
    Marshaller<T>
    Type Parameters
    Name Description
    T
    Back to top Generated by DocFX