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."],[[["The `SerializationContext` class provides storage for the payload when serializing a message in the Grpc.Core library."],["`Complete()` finalizes the payload written to the buffer, and can only be invoked once during the serialization process."],["`Complete(byte[])` uses a provided byte array as the serialized form, marking the process as complete and transferring ownership of the payload to the method."],["`GetBufferWriter()` allows the caller to write serialized data to a buffer, which must be completed by calling `Complete()` afterwards."],["`SetPayloadLength(Int32)` can be optionally used to set the known payload length in advance, which can improve efficiency by avoiding data copies during serialization."]]],[]]