Index: third_party/protobuf/csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs |
diff --git a/third_party/protobuf/csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs b/third_party/protobuf/csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs |
index 8a6fefa74e88ab99e2876e7265dcaa682c15e65c..e3914dd3749598becd41ffc95f144c2294dd7750 100644 |
--- a/third_party/protobuf/csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs |
+++ b/third_party/protobuf/csharp/src/Google.Protobuf/Compatibility/PropertyInfoExtensions.cs |
@@ -47,7 +47,11 @@ namespace Google.Protobuf.Compatibility |
/// </summary> |
internal static MethodInfo GetGetMethod(this PropertyInfo target) |
{ |
+#if DOTNET35 |
+ var method = target.GetGetMethod(); |
+#else |
var method = target.GetMethod; |
+#endif |
return method != null && method.IsPublic ? method : null; |
} |
@@ -57,7 +61,11 @@ namespace Google.Protobuf.Compatibility |
/// </summary> |
internal static MethodInfo GetSetMethod(this PropertyInfo target) |
{ |
+#if DOTNET35 |
+ var method = target.GetSetMethod(); |
+#else |
var method = target.SetMethod; |
+#endif |
return method != null && method.IsPublic ? method : null; |
} |
} |