aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/ByteString.cs
diff options
context:
space:
mode:
authorJohn Brock <JohnHBrock@gmail.com>2017-02-13 15:34:35 -0800
committerJon Skeet <skeet@pobox.com>2017-02-23 10:51:52 +0000
commitc9b2c8f3271f9985a738fe193ced5b3324ae8c7c (patch)
tree11e60a4c6da0e9eb94ca026aac8e3bc4d323e62c /csharp/src/Google.Protobuf/ByteString.cs
parent1a8cbfd355603e094858cbfdf5999b860dbab13f (diff)
downloadprotobuf-c9b2c8f3271f9985a738fe193ced5b3324ae8c7c.tar.gz
protobuf-c9b2c8f3271f9985a738fe193ced5b3324ae8c7c.tar.bz2
protobuf-c9b2c8f3271f9985a738fe193ced5b3324ae8c7c.zip
Fixes for .NET 3.5 compatibility
* Changing DOTNET35 framework symbols in preprocessor directives to the default built-in value of NET35. * Adding extension method StreamExtension.CopyTo for .NET 3.5 because it didn’t exist until .NET 4, and adding associated unit tests.
Diffstat (limited to 'csharp/src/Google.Protobuf/ByteString.cs')
-rwxr-xr-x[-rw-r--r--]csharp/src/Google.Protobuf/ByteString.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/csharp/src/Google.Protobuf/ByteString.cs b/csharp/src/Google.Protobuf/ByteString.cs
index 9973d211..4abdb718 100644..100755
--- a/csharp/src/Google.Protobuf/ByteString.cs
+++ b/csharp/src/Google.Protobuf/ByteString.cs
@@ -35,10 +35,13 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
-#if !DOTNET35
+#if !NET35
using System.Threading;
using System.Threading.Tasks;
#endif
+#if NET35
+using Google.Protobuf.Compatibility;
+#endif
namespace Google.Protobuf
{
@@ -167,7 +170,7 @@ namespace Google.Protobuf
return AttachBytes(bytes);
}
-#if !DOTNET35
+#if !NET35
/// <summary>
/// Constructs a <see cref="ByteString"/> from data in the given stream, asynchronously.
/// </summary>