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\u003eThe \u003ccode\u003eSerializationContext\u003c/code\u003e class provides storage for the payload when serializing a message in the Grpc.Core library.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComplete()\u003c/code\u003e finalizes the payload written to the buffer, and can only be invoked once during the serialization process.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComplete(byte[])\u003c/code\u003e uses a provided byte array as the serialized form, marking the process as complete and transferring ownership of the payload to the method.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGetBufferWriter()\u003c/code\u003e allows the caller to write serialized data to a buffer, which must be completed by calling \u003ccode\u003eComplete()\u003c/code\u003e afterwards.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSetPayloadLength(Int32)\u003c/code\u003e can be optionally used to set the known payload length in advance, which can improve efficiency by avoiding data copies during serialization.\u003c/p\u003e\n"]]],[],null,[]]