diff options
author | csharptest <roger@csharptest.net> | 2011-06-11 12:30:15 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-06-11 12:30:15 -0500 |
commit | 6c69373f80c095591d392be24a708e275d75a08f (patch) | |
tree | 1ef5bf991567657ae1e21445ec1f14d686682567 /src/ProtocolBuffers | |
parent | 3b70dd78ec6b3b348b51766ea728d8226c908fd6 (diff) | |
download | protobuf-6c69373f80c095591d392be24a708e275d75a08f.tar.gz protobuf-6c69373f80c095591d392be24a708e275d75a08f.tar.bz2 protobuf-6c69373f80c095591d392be24a708e275d75a08f.zip |
bla, changed name to Depth for CLSComplaint :)
Diffstat (limited to 'src/ProtocolBuffers')
-rw-r--r-- | src/ProtocolBuffers/Serialization/AbstractReader.cs | 18 | ||||
-rw-r--r-- | src/ProtocolBuffers/Serialization/XmlFormatReader.cs | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/ProtocolBuffers/Serialization/AbstractReader.cs b/src/ProtocolBuffers/Serialization/AbstractReader.cs index eb9baae1..3aa54e8f 100644 --- a/src/ProtocolBuffers/Serialization/AbstractReader.cs +++ b/src/ProtocolBuffers/Serialization/AbstractReader.cs @@ -13,7 +13,7 @@ namespace Google.ProtocolBuffers.Serialization public abstract class AbstractReader : ICodedInputStream
{
const int MaxDepth = CodedInputStream.DefaultRecursionLimit;
- protected int _depth;
+ protected int Depth;
/// <summary>
/// Merges the contents of stream into the provided message builder
@@ -334,10 +334,10 @@ namespace Google.ProtocolBuffers.Serialization void ICodedInputStream.ReadGroup(int fieldNumber, IBuilderLite builder, ExtensionRegistry extensionRegistry)
{
- if (_depth++ > MaxDepth)
+ if (Depth++ > MaxDepth)
throw InvalidProtocolBufferException.RecursionLimitExceeded();
ReadGroup(builder, extensionRegistry);
- _depth--;
+ Depth--;
}
void ICodedInputStream.ReadUnknownGroup(int fieldNumber, IBuilderLite builder)
@@ -345,10 +345,10 @@ namespace Google.ProtocolBuffers.Serialization void ICodedInputStream.ReadMessage(IBuilderLite builder, ExtensionRegistry extensionRegistry)
{
- if (_depth++ > MaxDepth)
+ if (Depth++ > MaxDepth)
throw InvalidProtocolBufferException.RecursionLimitExceeded();
ReadMessage(builder, extensionRegistry);
- _depth--;
+ Depth--;
}
bool ICodedInputStream.ReadBytes(ref ByteString value)
@@ -453,18 +453,18 @@ namespace Google.ProtocolBuffers.Serialization void ICodedInputStream.ReadMessageArray<T>(uint fieldTag, string fieldName, ICollection<T> list, T messageType, ExtensionRegistry registry)
{
- if (_depth++ > MaxDepth)
+ if (Depth++ > MaxDepth)
throw InvalidProtocolBufferException.RecursionLimitExceeded();
ReadMessageArray(fieldName, list, messageType, registry);
- _depth--;
+ Depth--;
}
void ICodedInputStream.ReadGroupArray<T>(uint fieldTag, string fieldName, ICollection<T> list, T messageType, ExtensionRegistry registry)
{
- if (_depth++ > MaxDepth)
+ if (Depth++ > MaxDepth)
throw InvalidProtocolBufferException.RecursionLimitExceeded();
ReadGroupArray(fieldName, list, messageType, registry);
- _depth--;
+ Depth--;
}
bool ICodedInputStream.ReadPrimitiveField(FieldType fieldType, ref object value)
diff --git a/src/ProtocolBuffers/Serialization/XmlFormatReader.cs b/src/ProtocolBuffers/Serialization/XmlFormatReader.cs index fcd83fb3..f3ca1314 100644 --- a/src/ProtocolBuffers/Serialization/XmlFormatReader.cs +++ b/src/ProtocolBuffers/Serialization/XmlFormatReader.cs @@ -74,7 +74,7 @@ namespace Google.ProtocolBuffers.Serialization {
XmlFormatReader copy = new XmlFormatReader(rdr).SetOptions(Options);
copy._rootElementName = _rootElementName;
- copy._depth = _depth;
+ copy.Depth = Depth;
return copy;
}
|