add WriteContext.Flush() method

This commit is contained in:
Jan Tattermusch 2020-06-03 14:22:40 +02:00
parent 3cdc107bda
commit ecbb29d354

View File

@ -338,6 +338,12 @@ namespace Google.Protobuf
WritingPrimitives.WriteRawTag(ref buffer, ref state, b1, b2, b3, b4, b5);
}
internal void Flush()
{
// TODO: should the method be static or not?
state.writeBufferHelper.Flush(ref buffer, ref state);
}
internal void CopyStateTo(CodedOutputStream output)
{
output.InternalState = state;