diff options
author | csharptest <roger@csharptest.net> | 2010-11-04 19:36:28 -0500 |
---|---|---|
committer | unknown <rknapp@.svault.int> | 2010-11-04 19:36:28 -0500 |
commit | d9c59e66131b34833f04c591fa8fe8719afa0b47 (patch) | |
tree | 9dae9f520524b845ecad2cbeee76df653b3ceb1d /src/ProtocolBuffers/CodedInputStream.cs | |
parent | c07571a79b37a4be4551ff0cded0b160d4e8ee6c (diff) | |
download | protobuf-d9c59e66131b34833f04c591fa8fe8719afa0b47.tar.gz protobuf-d9c59e66131b34833f04c591fa8fe8719afa0b47.tar.bz2 protobuf-d9c59e66131b34833f04c591fa8fe8719afa0b47.zip |
First pass at interface breakup
Diffstat (limited to 'src/ProtocolBuffers/CodedInputStream.cs')
-rw-r--r-- | src/ProtocolBuffers/CodedInputStream.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/ProtocolBuffers/CodedInputStream.cs b/src/ProtocolBuffers/CodedInputStream.cs index 3306f309..9173423c 100644 --- a/src/ProtocolBuffers/CodedInputStream.cs +++ b/src/ProtocolBuffers/CodedInputStream.cs @@ -36,7 +36,9 @@ using System; using System.Collections.Generic; using System.IO; using System.Text; +#if !LITE using Google.ProtocolBuffers.Descriptors; +#endif namespace Google.ProtocolBuffers { @@ -258,8 +260,8 @@ namespace Google.ProtocolBuffers { /// <summary> /// Reads a group field value from the stream. /// </summary> - public void ReadGroup(int fieldNumber, IBuilder builder, - ExtensionRegistry extensionRegistry) { + public void ReadGroup(int fieldNumber, IBuilderLite builder, + ExtensionRegistryLite extensionRegistry) { if (recursionDepth >= recursionLimit) { throw InvalidProtocolBufferException.RecursionLimitExceeded(); } @@ -273,12 +275,14 @@ namespace Google.ProtocolBuffers { /// Reads a group field value from the stream and merges it into the given /// UnknownFieldSet. /// </summary> - public void ReadUnknownGroup(int fieldNumber, UnknownFieldSet.Builder builder) { + [Obsolete] + public void ReadUnknownGroup(int fieldNumber, IBuilderLite builder) + { if (recursionDepth >= recursionLimit) { throw InvalidProtocolBufferException.RecursionLimitExceeded(); } ++recursionDepth; - builder.MergeFrom(this); + builder.WeakMergeFrom(this); CheckLastTagWas(WireFormat.MakeTag(fieldNumber, WireFormat.WireType.EndGroup)); --recursionDepth; } @@ -286,7 +290,7 @@ namespace Google.ProtocolBuffers { /// <summary> /// Reads an embedded message field value from the stream. /// </summary> - public void ReadMessage(IBuilder builder, ExtensionRegistry extensionRegistry) { + public void ReadMessage(IBuilderLite builder, ExtensionRegistryLite extensionRegistry) { int length = (int) ReadRawVarint32(); if (recursionDepth >= recursionLimit) { throw InvalidProtocolBufferException.RecursionLimitExceeded(); @@ -359,7 +363,7 @@ namespace Google.ProtocolBuffers { public long ReadSInt64() { return DecodeZigZag64(ReadRawVarint64()); } - +#if !LITE /// <summary> /// Reads a field of any primitive type. Enums, groups and embedded /// messages are not handled by this method. @@ -393,7 +397,7 @@ namespace Google.ProtocolBuffers { throw new ArgumentOutOfRangeException("Invalid field type " + fieldType); } } - +#endif #endregion #region Underlying reading primitives |