diff options
author | Jon Skeet <jonskeet@google.com> | 2015-06-30 13:16:20 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-06-30 13:20:31 +0100 |
commit | f34d37a3d4d64621bc87aa0a65a05cab64062399 (patch) | |
tree | 416cceb9b343b21004b030deea069553644928d3 /csharp/src/ProtocolBuffers/FieldCodec.cs | |
parent | b9d1d3891f4e68886398bbf0caf40229275a448a (diff) | |
download | protobuf-f34d37a3d4d64621bc87aa0a65a05cab64062399.tar.gz protobuf-f34d37a3d4d64621bc87aa0a65a05cab64062399.tar.bz2 protobuf-f34d37a3d4d64621bc87aa0a65a05cab64062399.zip |
Tidying up and extra tests.
This is mostly just making things internal instead of public, removing and reordering a bunch of code in CodedInputStream/CodedOutputStream, and generally tidying up.
Diffstat (limited to 'csharp/src/ProtocolBuffers/FieldCodec.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/FieldCodec.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/csharp/src/ProtocolBuffers/FieldCodec.cs b/csharp/src/ProtocolBuffers/FieldCodec.cs index d3fc2f71..f075dbbf 100644 --- a/csharp/src/ProtocolBuffers/FieldCodec.cs +++ b/csharp/src/ProtocolBuffers/FieldCodec.cs @@ -8,6 +8,7 @@ namespace Google.Protobuf /// </summary> public static class FieldCodec { + // TODO: Avoid the "dual hit" of lambda expressions: create open delegates instead. (At least test...) public static FieldCodec<string> ForString(uint tag) { return new FieldCodec<string>(input => input.ReadString(), (output, value) => output.WriteString(value), CodedOutputStream.ComputeStringSize, tag); @@ -84,7 +85,7 @@ namespace Google.Protobuf } // Enums are tricky. We can probably use expression trees to build these delegates automatically, - // but it's easy to generate the code fdor it. + // but it's easy to generate the code for it. public static FieldCodec<T> ForEnum<T>(uint tag, Func<T, int> toInt32, Func<int, T> fromInt32) { return new FieldCodec<T>(input => fromInt32( |