diff options
author | Jon Skeet <jonskeet@google.com> | 2017-05-24 06:40:34 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2018-03-27 08:42:26 +0100 |
commit | 8ba420f040a2987aea55bb9c103606971427cb3d (patch) | |
tree | d4a479e29756ab0425a95836674cf5ced34e66e0 /csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs | |
parent | 63bba9bba10eec02201f7bfa309da4f7089554ec (diff) |
Change C# reflection to avoid using expression trees
This should work on Unity, Mono and .NET 3.5 as far as I'm aware.
It won't work on platforms where reflection itself is prohibited,
but that's a non-starter basically.
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs index 8714ab18..97596218 100644 --- a/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs +++ b/csharp/src/Google.Protobuf/Reflection/OneofAccessor.cs @@ -52,7 +52,7 @@ namespace Google.Protobuf.Reflection throw new ArgumentException("Cannot read from property"); } this.descriptor = descriptor; - caseDelegate = ReflectionUtil.CreateFuncIMessageT<int>(caseProperty.GetGetMethod()); + caseDelegate = ReflectionUtil.CreateFuncIMessageInt32(caseProperty.GetGetMethod()); this.descriptor = descriptor; clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); |