public Marshaller(Action<T, SerializationContext> serializer, Func<DeserializationContext, T> deserializer)
Initializes a new marshaller from serialize/deserialize fuctions that can access serialization and deserialization
context. Compared to the simple serializer/deserializer functions, using the contextual version provides more
flexibility and can lead to increased efficiency (and better performance).
Note: This constructor is part of an experimental API that can change or be removed without any prior notice.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eMarshaller<T>\u003c/code\u003e class in \u003ccode\u003eGrpc.Core\u003c/code\u003e encapsulates the logic for serializing and deserializing messages.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two constructors: one that uses \u003ccode\u003eAction<T, SerializationContext>\u003c/code\u003e and \u003ccode\u003eFunc<DeserializationContext, T>\u003c/code\u003e for contextual serialization and deserialization, and another that uses \u003ccode\u003eFunc<T, byte[]>\u003c/code\u003e and \u003ccode\u003eFunc<byte[], T>\u003c/code\u003e for simpler functions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMarshaller<T>\u003c/code\u003e class provides four properties to access the serializer and deserializer functions: \u003ccode\u003eContextualSerializer\u003c/code\u003e, \u003ccode\u003eContextualDeserializer\u003c/code\u003e, \u003ccode\u003eSerializer\u003c/code\u003e, and \u003ccode\u003eDeserializer\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and includes methods like \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eMemberwiseClone\u003c/code\u003e, \u003ccode\u003eReferenceEquals\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e from the parent object class.\u003c/p\u003e\n"],["\u003cp\u003eThe contextual constructor is considered to be an experimental API, and may change or be removed without notice.\u003c/p\u003e\n"]]],[],null,[]]