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 using GetBufferWriter() 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 when Complete() is called.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["`SerializationContext` is an abstract class that provides storage for payload during message serialization in the Grpc.Core library."],["The `Complete()` method finalizes the payload written to the buffer, and it must be called only once after writing is finished."],["The `Complete(byte[])` method uses a given byte array as the serialized form of the message, relinquishing ownership of the array."],["`GetBufferWriter()` allows retrieval of an `IBufferWriter\u003cbyte\u003e` for writing serialized data, which requires a subsequent call to `Complete()`."],["`SetPayloadLength(int)` allows predefining the payload length for improved serialization efficiency, although it is an optional method."]]],[]]