|
|
@ -162,6 +162,15 @@ namespace Grpc.Core |
|
|
|
return new Marshaller<T>(serializer, deserializer); |
|
|
|
return new Marshaller<T>(serializer, deserializer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// 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. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
public static Marshaller<T> Create<T>(Action<T, SerializationContext> serializer, Func<DeserializationContext, T> deserializer) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return new Marshaller<T>(serializer, deserializer); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Returns a marshaller for <c>string</c> type. This is useful for testing. |
|
|
|
/// Returns a marshaller for <c>string</c> type. This is useful for testing. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|