예제 #1
0
 /// <summary>
 /// Used internally by CodedOutputStream to avoid creating a copy for the write
 /// </summary>
 internal void WriteRawBytesTo(CodedOutputStream outputStream)
 {
     outputStream.WriteRawBytes(bytes, 0, bytes.Length);
 }
예제 #2
0
 public static void Initialize(CodedOutputStream codedOutputStream, out WriteBufferHelper instance)
 {
     instance.bufferWriter      = null;
     instance.codedOutputStream = codedOutputStream;
 }
예제 #3
0
 internal void CopyStateTo(CodedOutputStream output)
 {
     output.InternalState = state;
 }
예제 #4
0
 internal void LoadStateFrom(CodedOutputStream output)
 {
     state = output.InternalState;
 }
예제 #5
0
            internal static int CalculateSize <T>(T value, FieldCodec <T> codec)
            {
                int fieldLength = codec.CalculateSizeWithTag(value);

                return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength);
            }