Skip to content
Snippets Groups Projects
Commit 7cc83c8c authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

allow creating fake CallSafeHandle

parent c7c2bf17
No related branches found
No related tags found
No related merge requests found
...@@ -218,5 +218,16 @@ namespace Grpc.Core.Internal ...@@ -218,5 +218,16 @@ namespace Grpc.Core.Internal
{ {
return buffered ? 0 : GRPC_WRITE_BUFFER_HINT; return buffered ? 0 : GRPC_WRITE_BUFFER_HINT;
} }
/// <summary>
/// Only for testing.
/// </summary>
public static CallSafeHandle CreateFake(IntPtr ptr, CompletionQueueSafeHandle cq)
{
var call = new CallSafeHandle();
call.SetHandle(ptr);
call.Initialize(cq);
return call;
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment