aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-07-19 23:26:33 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-07-19 23:26:33 +0200
commitbe6f3e393fdbf80f01b311ad310ef60e5b9a6537 (patch)
tree81474df9897ebe56f8693d3a58519704615d766d
parent3511f45964808f3ed73109fa4086298422036665 (diff)
better NativeExtension.LoadNativeMethods readability
-rw-r--r--src/csharp/Grpc.Core/Internal/NativeExtension.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs
index 5e1affcb99..f526b913af 100644
--- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs
+++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs
@@ -106,9 +106,15 @@ namespace Grpc.Core.Internal
/// </summary>
private static NativeMethods LoadNativeMethods()
{
- return PlatformApis.IsUnity ? LoadNativeMethodsUnity() :
- PlatformApis.IsXamarin ? LoadNativeMethodsXamarin() :
- new NativeMethods(LoadUnmanagedLibrary());
+ if (PlatformApis.IsUnity)
+ {
+ return LoadNativeMethodsUnity();
+ }
+ if (PlatformApis.IsXamarin)
+ {
+ return LoadNativeMethodsXamarin();
+ }
+ return new NativeMethods(LoadUnmanagedLibrary());
}
/// <summary>