Commit ed701ad2 authored by csharptest's avatar csharptest Committed by rogerk

renamed ByteString.WriteTo(CodedOutputStream) to WriteRawBytesTo

parent 398a7f52
...@@ -252,7 +252,10 @@ namespace Google.ProtocolBuffers ...@@ -252,7 +252,10 @@ namespace Google.ProtocolBuffers
} }
} }
internal void WriteTo(CodedOutputStream outputStream) /// <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); outputStream.WriteRawBytes(bytes, 0, bytes.Length);
} }
......
...@@ -360,7 +360,7 @@ namespace Google.ProtocolBuffers ...@@ -360,7 +360,7 @@ namespace Google.ProtocolBuffers
{ {
WriteTag(fieldNumber, WireFormat.WireType.LengthDelimited); WriteTag(fieldNumber, WireFormat.WireType.LengthDelimited);
WriteRawVarint32((uint) value.Length); WriteRawVarint32((uint) value.Length);
value.WriteTo(this); value.WriteRawBytesTo(this);
} }
[CLSCompliant(false)] [CLSCompliant(false)]
...@@ -637,7 +637,7 @@ namespace Google.ProtocolBuffers ...@@ -637,7 +637,7 @@ namespace Google.ProtocolBuffers
public void WriteBytesNoTag(ByteString value) public void WriteBytesNoTag(ByteString value)
{ {
WriteRawVarint32((uint) value.Length); WriteRawVarint32((uint) value.Length);
value.WriteTo(this); value.WriteRawBytesTo(this);
} }
[CLSCompliant(false)] [CLSCompliant(false)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment