aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-09-29 19:30:51 -0500
committerrogerk <devnull@localhost>2011-09-29 19:30:51 -0500
commitf67c83365f4fe7850eb25b6af38833de61c79057 (patch)
tree7f0cf0575fd57063f371c7b1987437ddeb992b49 /src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
parentfa8fa92499e4bb5f74ecaa08535f177c56d8fd52 (diff)
downloadprotobuf-f67c83365f4fe7850eb25b6af38833de61c79057.tar.gz
protobuf-f67c83365f4fe7850eb25b6af38833de61c79057.tar.bz2
protobuf-f67c83365f4fe7850eb25b6af38833de61c79057.zip
Added comments for private fields
Renamed StartMessage(name) to WriteMessageStart(name) on XmlFormatWriter as this was intended to be an overload that did not get renamed.
Diffstat (limited to 'src/ProtocolBuffers.Serialization/XmlFormatWriter.cs')
-rw-r--r--src/ProtocolBuffers.Serialization/XmlFormatWriter.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
index fc3f9dc2..4bd27562 100644
--- a/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
+++ b/src/ProtocolBuffers.Serialization/XmlFormatWriter.cs
@@ -16,9 +16,11 @@ namespace Google.ProtocolBuffers.Serialization
{
private static readonly Encoding DefaultEncoding = new UTF8Encoding(false);
public const string DefaultRootElementName = "root";
- private const int NestedArrayFlag = 0x0001;
+
private readonly XmlWriter _output;
+ // The default element name used for WriteMessageStart
private string _rootElementName;
+ // Used to assert matching WriteMessageStart/WriteMessageEnd calls
private int _messageOpenCount;
private static XmlWriterSettings DefaultSettings(Encoding encoding)
@@ -119,7 +121,7 @@ namespace Google.ProtocolBuffers.Serialization
/// </summary>
public override void WriteMessageStart()
{
- StartMessage(_rootElementName);
+ WriteMessageStart(_rootElementName);
}
/// <summary>
@@ -127,7 +129,7 @@ namespace Google.ProtocolBuffers.Serialization
/// After this call you can call IMessageLite.MergeTo(...) and complete the message with
/// a call to WriteMessageEnd().
/// </summary>
- public void StartMessage(string elementName)
+ public void WriteMessageStart(string elementName)
{
if (TestOption(XmlWriterOptions.OutputJsonTypes))
{
@@ -169,7 +171,7 @@ namespace Google.ProtocolBuffers.Serialization
/// </summary>
public void WriteMessage(string elementName, IMessageLite message)
{
- StartMessage(elementName);
+ WriteMessageStart(elementName);
message.WriteTo(this);
WriteMessageEnd();
}