|
|
@ -134,7 +134,11 @@ namespace Grpc.Core.Internal |
|
|
|
{ |
|
|
|
{ |
|
|
|
throw new MissingMethodException(string.Format("The native method \"{0}\" does not exist", methodName)); |
|
|
|
throw new MissingMethodException(string.Format("The native method \"{0}\" does not exist", methodName)); |
|
|
|
} |
|
|
|
} |
|
|
|
return Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T; |
|
|
|
#if NETSTANDARD1_5 |
|
|
|
|
|
|
|
return Marshal.GetDelegateForFunctionPointer<T>(ptr); // non-generic version is obsolete |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
return Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T; // generic version not available in .NET45 |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|