aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-07-23 18:01:17 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-07-23 18:01:17 +0200
commitbf5524b1c1920242e7b04aedf466da580733c864 (patch)
treec218c06ed605239a389ecd5cc7907645f3646922 /src/csharp/Grpc.Core
parent1add55dbda076393bea0419b707f3353235d05ff (diff)
add explanation for MonoPInvokeCallback attribute
Diffstat (limited to 'src/csharp/Grpc.Core')
-rw-r--r--src/csharp/Grpc.Core/Internal/NativeLogRedirector.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core/Internal/NativeLogRedirector.cs b/src/csharp/Grpc.Core/Internal/NativeLogRedirector.cs
index 72dd21dc94..30264acb10 100644
--- a/src/csharp/Grpc.Core/Internal/NativeLogRedirector.cs
+++ b/src/csharp/Grpc.Core/Internal/NativeLogRedirector.cs
@@ -88,6 +88,13 @@ namespace Grpc.Core.Internal
}
}
+ /// <summary>
+ /// Use this attribute to mark methods that will be called back from P/Invoke calls.
+ /// iOS (and probably other AOT platforms) needs to have delegates registered.
+ /// Instead of depending on Xamarin.iOS for this, we can just create our own,
+ /// the iOS runtime just checks for the type name.
+ /// See: https://docs.microsoft.com/en-gb/xamarin/ios/internals/limitations#reverse-callbacks
+ /// </summary>
[AttributeUsage(AttributeTargets.Method)]
internal sealed class MonoPInvokeCallbackAttribute : Attribute
{