aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/ICodedInputStream.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-06-11 21:15:36 +0100
committerJon Skeet <skeet@pobox.com>2015-06-11 21:15:36 +0100
commit39aaf21d5194fdc07c296847def8e7795279e041 (patch)
tree174c362717574e13047c4d590b5f9609405aed84 /csharp/src/ProtocolBuffers/ICodedInputStream.cs
parentce0e348ded9cb7e180588476ebb5a8f3e0460f4e (diff)
downloadprotobuf-39aaf21d5194fdc07c296847def8e7795279e041.tar.gz
protobuf-39aaf21d5194fdc07c296847def8e7795279e041.tar.bz2
protobuf-39aaf21d5194fdc07c296847def8e7795279e041.zip
Reimplement enums as int values, and get rid of EnumHelper.
This makes repeated fields really awkward at the moment - but when we reimplement RepeatedField<T> to be backed by an array, we can cast the array directly...
Diffstat (limited to 'csharp/src/ProtocolBuffers/ICodedInputStream.cs')
-rw-r--r--csharp/src/ProtocolBuffers/ICodedInputStream.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/csharp/src/ProtocolBuffers/ICodedInputStream.cs b/csharp/src/ProtocolBuffers/ICodedInputStream.cs
index 748589a0..d962e62b 100644
--- a/csharp/src/ProtocolBuffers/ICodedInputStream.cs
+++ b/csharp/src/ProtocolBuffers/ICodedInputStream.cs
@@ -146,14 +146,11 @@ namespace Google.Protobuf
bool ReadUInt32(ref uint value);
/// <summary>
- /// Reads an enum field value from the stream. If the enum is valid for type T,
- /// then the ref value is set and it returns true. Otherwise, if a value is present
- /// but invalid for the proto enum, it is still set in the field as a "preserved
- /// but invalid" value, and the method returns true. If no value can be read, the
- /// method does not affect the parameter and returns false.
+ /// Reads an enum field value from the stream. This performs no checking
+ /// as to whether the enum value is known to the enum type as it was present
+ /// when the code was generated.
/// </summary>
- bool ReadEnum<T>(ref T value)
- where T : struct, IComparable, IFormattable;
+ bool ReadEnum(ref int value);
/// <summary>
/// Reads an sfixed32 field value from the stream.