From 0dbd5ec80d33ea2a37f5362a24fd72b2c5f51aaa Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 23 Jul 2015 15:31:34 +0100 Subject: First attempt at using profile 259 for Google.Protobuf. This requires .NET 4.5, and there are a few compatibility changes required around reflection. Creating a PR from this to see how our CI systems handle it. Will want to add more documentation, validation and probably tests before merging. This is in aid of issue #590. --- csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs | 1 + csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs | 1 + csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs | 1 + csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs | 3 ++- csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) (limited to 'csharp/src/Google.Protobuf/Reflection') diff --git a/csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs b/csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs index 0893dc3d..3fccf884 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldAccessorBase.cs @@ -32,6 +32,7 @@ using System; using System.Reflection; +using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { diff --git a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs index a8609b8a..60f2bb8b 100644 --- a/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs @@ -32,6 +32,7 @@ using System; using System.Linq; +using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { diff --git a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs index 20cbea92..8631a1c5 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs @@ -32,6 +32,7 @@ using System; using System.Reflection; +using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { diff --git a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs index cd4c5534..8571a5eb 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofDescriptor.cs @@ -33,6 +33,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { @@ -91,7 +92,7 @@ namespace Google.Protobuf.Reflection { throw new DescriptorValidationException(this, "Property " + clrName + "Case not found in " + containingType.GeneratedType); } - var clearMethod = containingType.GeneratedType.GetMethod("Clear" + clrName, ReflectionUtil.EmptyTypes); + var clearMethod = containingType.GeneratedType.GetMethod("Clear" + clrName); if (clearMethod == null) { throw new DescriptorValidationException(this, "Method Clear" + clrName + " not found in " + containingType.GeneratedType); diff --git a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs index f00a51ba..851efc26 100644 --- a/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/SingleFieldAccessor.cs @@ -32,6 +32,7 @@ using System; using System.Reflection; +using Google.Protobuf.Compatibility; namespace Google.Protobuf.Reflection { -- cgit v1.2.3