Commit c86b5044 authored by csharptest's avatar csharptest Committed by rogerk

Missing braces :)

parent f52ec95a
...@@ -246,8 +246,10 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -246,8 +246,10 @@ namespace Google.ProtocolBuffers.Serialization
{ {
if (disposing) if (disposing)
{ {
while(_counter.Count > 1) while (_counter.Count > 1)
{
WriteMessageEnd(); WriteMessageEnd();
}
} }
base.Dispose(disposing); base.Dispose(disposing);
......
...@@ -78,8 +78,10 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -78,8 +78,10 @@ namespace Google.ProtocolBuffers.Serialization
{ {
if (disposing) if (disposing)
{ {
while(_messageOpenCount > 0) while (_messageOpenCount > 0)
{
WriteMessageEnd(); WriteMessageEnd();
}
_output.Close(); _output.Close();
} }
...@@ -163,7 +165,9 @@ namespace Google.ProtocolBuffers.Serialization ...@@ -163,7 +165,9 @@ namespace Google.ProtocolBuffers.Serialization
public override void WriteMessageEnd() public override void WriteMessageEnd()
{ {
if (_messageOpenCount <= 0) if (_messageOpenCount <= 0)
{
throw new InvalidOperationException(); throw new InvalidOperationException();
}
_output.WriteEndElement(); _output.WriteEndElement();
_output.Flush(); _output.Flush();
......
...@@ -131,7 +131,9 @@ namespace Google.ProtocolBuffers ...@@ -131,7 +131,9 @@ namespace Google.ProtocolBuffers
if (output != null) if (output != null)
{ {
if (position > 0) if (position > 0)
{
Flush(); Flush();
}
output.Dispose(); output.Dispose();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment