aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/TextFormat.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-07-14 13:06:22 -0500
committerrogerk <devnull@localhost>2011-07-14 13:06:22 -0500
commit74c5e0c3762939fbf5988daf6f97c5d9c97ef4f5 (patch)
tree642a1a002907d3291c88e7933cfda87a6704beee /src/ProtocolBuffers/TextFormat.cs
parentafff2c655c1d39b8f6cd7756c190a559d15134d1 (diff)
downloadprotobuf-74c5e0c3762939fbf5988daf6f97c5d9c97ef4f5.tar.gz
protobuf-74c5e0c3762939fbf5988daf6f97c5d9c97ef4f5.tar.bz2
protobuf-74c5e0c3762939fbf5988daf6f97c5d9c97ef4f5.zip
Reformatted to include braces
Diffstat (limited to 'src/ProtocolBuffers/TextFormat.cs')
-rw-r--r--src/ProtocolBuffers/TextFormat.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ProtocolBuffers/TextFormat.cs b/src/ProtocolBuffers/TextFormat.cs
index 77aaa8fa..bbc76186 100644
--- a/src/ProtocolBuffers/TextFormat.cs
+++ b/src/ProtocolBuffers/TextFormat.cs
@@ -35,12 +35,12 @@
#endregion
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using Google.ProtocolBuffers.Descriptors;
-using System.Collections;
namespace Google.ProtocolBuffers
{
@@ -166,14 +166,14 @@ namespace Google.ProtocolBuffers
{
switch (field.FieldType)
{
- // The Float and Double types must specify the "r" format to preserve their precision, otherwise,
- // the double to/from string will trim the precision to 6 places. As with other numeric formats
- // below, always use the invariant culture so it's predictable.
+ // The Float and Double types must specify the "r" format to preserve their precision, otherwise,
+ // the double to/from string will trim the precision to 6 places. As with other numeric formats
+ // below, always use the invariant culture so it's predictable.
case FieldType.Float:
- generator.Print(((float)value).ToString("r", CultureInfo.InvariantCulture));
+ generator.Print(((float) value).ToString("r", CultureInfo.InvariantCulture));
break;
case FieldType.Double:
- generator.Print(((double)value).ToString("r", CultureInfo.InvariantCulture));
+ generator.Print(((double) value).ToString("r", CultureInfo.InvariantCulture));
break;
case FieldType.Int32:
@@ -756,7 +756,9 @@ namespace Google.ProtocolBuffers
{
subBuilder = extension.DefaultInstance.WeakCreateBuilderForType() as IBuilder;
if (subBuilder == null)
+ {
throw new NotSupportedException("Lite messages are not supported.");
+ }
}
while (!tokenizer.TryConsume(endToken))