Exemplo n.º 1
0
 /// <summary>
 /// Redirects logs from native gRPC C core library to a general logger.
 /// </summary>
 public static void Redirect()
 {
     lock (staticLock)
     {
         if (writeCallback == null)
         {
             writeCallback = new GprLogDelegate(HandleWrite);
             grpcsharp_redirect_log(writeCallback);
         }
     }
 }
 /// <summary>
 /// Redirects logs from native gRPC C core library to a general logger.
 /// </summary>
 public static void Redirect(NativeMethods native)
 {
     lock (staticLock)
     {
         if (writeCallback == null)
         {
             writeCallback = new GprLogDelegate(HandleWrite);
             native.grpcsharp_redirect_log(writeCallback);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Redirects logs from native gRPC C core library to a general logger.
 /// </summary>
 public static void Redirect()
 {
     lock (staticLock)
     {
         if (writeCallback == null)
         {
             writeCallback = new GprLogDelegate(HandleWrite);
             pinvoke.grpcsharp_redirect_log(writeCallback);    
         }
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Sets text writer as destination for logs from native gRPC C core library.
 /// Only first invocation has effect.
 /// </summary>
 /// <param name="textWriter"></param>
 public static void RedirectNativeLogs(TextWriter textWriter)
 {
     lock (staticLock)
     {
         if (writeCallback == null)
         {
             writeCallback = new GprLogDelegate(HandleWrite);
             dest          = textWriter;
             grpcsharp_redirect_log(writeCallback);
         }
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Sets text writer as destination for logs from native gRPC C core library.
 /// Only first invocation has effect.
 /// </summary>
 /// <param name="textWriter"></param>
 public static void RedirectNativeLogs(TextWriter textWriter)
 {
     lock (staticLock)
     {
         if (writeCallback == null)
         {
             writeCallback = new GprLogDelegate(HandleWrite);
             dest = textWriter;
             grpcsharp_redirect_log(writeCallback);
         }
     }
 }
Exemplo n.º 6
0
 internal static extern void grpcsharp_redirect_log(GprLogDelegate callback);
Exemplo n.º 7
0
 void IPlatformInvocation.grpcsharp_redirect_log(GprLogDelegate callback)
 {
     grpcsharp_redirect_log(callback);
 }
Exemplo n.º 8
0
 static extern void grpcsharp_redirect_log(GprLogDelegate callback);
Exemplo n.º 9
0
 void IPlatformInvocation.grpcsharp_redirect_log(GprLogDelegate callback)
 {
     grpcsharp_redirect_log(callback);
 }