diff options
author | Jon Skeet <jonskeet@google.com> | 2015-06-25 16:42:09 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-06-26 20:13:06 +0100 |
commit | aa5104143cca3bf3e9f44a79f96e394960f45662 (patch) | |
tree | 3d7eaffeaac656277657a1410542ab3a2812e68c /csharp/src/ProtocolBuffers/ByteString.cs | |
parent | e75a10d8ff85901021a7c133534b6b87c3c7f072 (diff) | |
download | protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.gz protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.tar.bz2 protobuf-aa5104143cca3bf3e9f44a79f96e394960f45662.zip |
Remove a lot of code which wasn't needed any more.
Diffstat (limited to 'csharp/src/ProtocolBuffers/ByteString.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/ByteString.cs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/csharp/src/ProtocolBuffers/ByteString.cs b/csharp/src/ProtocolBuffers/ByteString.cs index e3a7ee50..a4afc5e2 100644 --- a/csharp/src/ProtocolBuffers/ByteString.cs +++ b/csharp/src/ProtocolBuffers/ByteString.cs @@ -265,38 +265,6 @@ namespace Google.Protobuf }
/// <summary>
- /// Builder for ByteStrings which allows them to be created without extra
- /// copying being involved. This has to be a nested type in order to have access
- /// to the private ByteString constructor.
- /// </summary>
- internal sealed class CodedBuilder
- {
- private readonly CodedOutputStream output;
- private readonly byte[] buffer;
-
- internal CodedBuilder(int size)
- {
- buffer = new byte[size];
- output = CodedOutputStream.CreateInstance(buffer);
- }
-
- internal ByteString Build()
- {
- output.CheckNoSpaceLeft();
-
- // We can be confident that the CodedOutputStream will not modify the
- // underlying bytes anymore because it already wrote all of them. So,
- // no need to make a copy.
- return new ByteString(buffer);
- }
-
- internal CodedOutputStream CodedOutput
- {
- get { return output; }
- }
- }
-
- /// <summary>
/// Used internally by CodedOutputStream to avoid creating a copy for the write
/// </summary>
internal void WriteRawBytesTo(CodedOutputStream outputStream)
|