aboutsummaryrefslogtreecommitdiff
path: root/csharp
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2008-08-16 21:23:40 +0100
committerJon Skeet <skeet@pobox.com>2008-08-16 21:23:40 +0100
commitf09fed217f86d1fdb2db97631178060d6d50cda1 (patch)
treea2139d90576fdf86cee163f09c27919126b150ea /csharp
parent2cbd799b5e548e1e6fb66b86aaf8f53b5f38b62f (diff)
downloadprotobuf-f09fed217f86d1fdb2db97631178060d6d50cda1.tar.gz
protobuf-f09fed217f86d1fdb2db97631178060d6d50cda1.tar.bz2
protobuf-f09fed217f86d1fdb2db97631178060d6d50cda1.zip
Small tidying.
Diffstat (limited to 'csharp')
-rw-r--r--csharp/ProtocolBuffers/ByteString.cs12
-rw-r--r--csharp/ProtocolBuffers/GeneratedBuilder.cs2
2 files changed, 6 insertions, 8 deletions
diff --git a/csharp/ProtocolBuffers/ByteString.cs b/csharp/ProtocolBuffers/ByteString.cs
index 13b9c159..26816d9c 100644
--- a/csharp/ProtocolBuffers/ByteString.cs
+++ b/csharp/ProtocolBuffers/ByteString.cs
@@ -1,4 +1,7 @@
-// Protocol Buffers - Google's data interchange format
+using System;
+using System.Collections;
+using System.Collections.Generic;
+// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.
// http://code.google.com/p/protobuf/
//
@@ -14,9 +17,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
using System.Text;
-using System;
-using System.Collections.Generic;
-using System.Collections;
namespace Google.ProtocolBuffers {
/// <summary>
@@ -27,7 +27,7 @@ namespace Google.ProtocolBuffers {
private static readonly ByteString empty = new ByteString(new byte[0]);
- private byte[] bytes;
+ private readonly byte[] bytes;
/// <summary>
/// Constructs a new ByteString from the given byte array. The array is
@@ -124,7 +124,7 @@ namespace Google.ProtocolBuffers {
return CodedInputStream.CreateInstance(bytes);
}
- // TODO(jonskeet): CopyTo, Equals, GetHashCode if they turn out to be required
+ // TODO(jonskeet): CopyTo if it turns out to be required
public override bool Equals(object obj) {
ByteString other = obj as ByteString;
diff --git a/csharp/ProtocolBuffers/GeneratedBuilder.cs b/csharp/ProtocolBuffers/GeneratedBuilder.cs
index a1c59e89..4f577a79 100644
--- a/csharp/ProtocolBuffers/GeneratedBuilder.cs
+++ b/csharp/ProtocolBuffers/GeneratedBuilder.cs
@@ -151,7 +151,6 @@ namespace Google.ProtocolBuffers {
/// <summary>
/// Like Build(), but will wrap UninitializedMessageException in
/// InvalidProtocolBufferException.
- /// TODO(jonskeet): This used to be generated for each class. Find out why.
/// </summary>
public TMessage BuildParsed() {
if (!IsInitialized) {
@@ -162,7 +161,6 @@ namespace Google.ProtocolBuffers {
/// <summary>
/// Implementation of <see cref="IBuilder{TMessage, TBuilder}.Build" />.
- /// TODO(jonskeet): This used to be generated for each class. Find out why.
/// </summary>
public override TMessage Build() {
if (!IsInitialized) {