diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-07-19 23:26:33 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-07-19 23:26:33 +0200 |
commit | be6f3e393fdbf80f01b311ad310ef60e5b9a6537 (patch) | |
tree | 81474df9897ebe56f8693d3a58519704615d766d /src | |
parent | 3511f45964808f3ed73109fa4086298422036665 (diff) |
better NativeExtension.LoadNativeMethods readability
Diffstat (limited to 'src')
-rw-r--r-- | src/csharp/Grpc.Core/Internal/NativeExtension.cs | 12 |
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> |