Class Marshallers
Utilities for creating marshallers.
Inheritance
System.Object
Marshallers
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
Assembly: Grpc.Core.Api.dll
Syntax
public static class Marshallers
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 |
|---|---|---|
| System.Action<T, SerializationContext> | serializer | |
| System.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 |
|---|---|---|
| System.Func<T, System.Byte[]> | serializer | |
| System.Func<System.Byte[], T> | deserializer |
Returns
| Type | Description |
|---|---|
| Marshaller<T> |
Type Parameters
| Name | Description |
|---|---|
| T |