|
|
@ -53,6 +53,9 @@ namespace Grpc.Core |
|
|
|
[DllImport("grpc_csharp_ext.dll")] |
|
|
|
[DllImport("grpc_csharp_ext.dll")] |
|
|
|
static extern void grpcsharp_shutdown(); |
|
|
|
static extern void grpcsharp_shutdown(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport("grpc_csharp_ext.dll")] |
|
|
|
|
|
|
|
static extern IntPtr grpcsharp_version_string(); // returns not-owned const char* |
|
|
|
|
|
|
|
|
|
|
|
static object staticLock = new object(); |
|
|
|
static object staticLock = new object(); |
|
|
|
static GrpcEnvironment instance; |
|
|
|
static GrpcEnvironment instance; |
|
|
|
|
|
|
|
|
|
|
@ -163,6 +166,15 @@ namespace Grpc.Core |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Gets version of gRPC C core. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
internal static string GetCoreVersionString() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var ptr = grpcsharp_version_string(); // the pointer is not owned |
|
|
|
|
|
|
|
return Marshal.PtrToStringAnsi(ptr); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Shuts down this environment. |
|
|
|
/// Shuts down this environment. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|