aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/WellKnownTypes
diff options
context:
space:
mode:
authordetlevschwabe <detlev.schwabe@gmail.com>2016-06-27 22:31:42 -0700
committerJon Skeet <skeet@pobox.com>2016-06-28 06:31:42 +0100
commitdc0aeaa9030bdac264b44d56d07b6839a1ae94e9 (patch)
tree4c2fa16988a67942b15307b8da9fd0e1f3994a99 /csharp/src/Google.Protobuf/WellKnownTypes
parent7b5648ca98b6bde2b18db109bdf020944e0b7baa (diff)
downloadprotobuf-dc0aeaa9030bdac264b44d56d07b6839a1ae94e9.tar.gz
protobuf-dc0aeaa9030bdac264b44d56d07b6839a1ae94e9.tar.bz2
protobuf-dc0aeaa9030bdac264b44d56d07b6839a1ae94e9.zip
Adding conditional compiler symbol to support .NET 3.5 (#1713)
* Adding condition compiler symbol to support .NET 3.5
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs5
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs4
2 files changed, 5 insertions, 4 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs
index 4bd62cf3..f9cdb8af 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMaskPartial.cs
@@ -59,7 +59,12 @@ namespace Google.Protobuf.WellKnownTypes
if (firstInvalid == null)
{
var writer = new StringWriter();
+#if DOTNET35
+ var query = paths.Select(JsonFormatter.ToCamelCase);
+ JsonFormatter.WriteString(writer, string.Join(",", query.ToArray()));
+#else
JsonFormatter.WriteString(writer, string.Join(",", paths.Select(JsonFormatter.ToCamelCase)));
+#endif
return writer.ToString();
}
else
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs b/csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs
index dd485d32..8b63d630 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/TimeExtensions.cs
@@ -31,10 +31,6 @@
#endregion
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace Google.Protobuf.WellKnownTypes
{