Class Marshallers
Utilities for creating marshallers.
Inheritance
System.Object
Marshallers
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
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
Returns
Type Parameters
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 Parameters