Complete the payload written to the buffer writer.Complete()can only be called once.
Complete(byte[])
publicvirtualvoidComplete(byte[]payload)
Use the byte array as serialized form of current message and mark serialization process as complete.Complete(byte[])can only be called once. By calling this method the caller gives up the ownership of the
payload which must not be accessed afterwards.
Sets the payload length when writing serialized data into a buffer writer. If the serializer knows the full payload
length in advance, providing that information before obtaining the buffer writer usingGetBufferWriter()can improve
serialization efficiency by avoiding copies. The provided payload length must be the same as the data written to the writer.
Calling this method is optional. If the payload length is not set then the length is calculated using the data written to
the buffer writer whenComplete()is called.
[[["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\u003e\u003ccode\u003eSerializationContext\u003c/code\u003e is an abstract class that provides storage for payload during message serialization in the Grpc.Core library.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eComplete()\u003c/code\u003e method finalizes the payload written to the buffer, and it must be called only once after writing is finished.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eComplete(byte[])\u003c/code\u003e method uses a given byte array as the serialized form of the message, relinquishing ownership of the array.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGetBufferWriter()\u003c/code\u003e allows retrieval of an \u003ccode\u003eIBufferWriter<byte>\u003c/code\u003e for writing serialized data, which requires a subsequent call to \u003ccode\u003eComplete()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSetPayloadLength(int)\u003c/code\u003e allows predefining the payload length for improved serialization efficiency, although it is an optional method.\u003c/p\u003e\n"]]],[],null,[]]