public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) { this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, "interceptor"); this.nativeInterceptor = NativeMetadataInterceptorHandler; // Make sure the callback doesn't get garbage collected until it is destroyed. this.gcHandle = GCHandle.Alloc(this.nativeInterceptor, GCHandleType.Normal); this.credentials = Native.grpcsharp_metadata_credentials_create_from_plugin(nativeInterceptor); }
public CallSafeHandle CreateCall(CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials) { var result = Native.grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.Initialize(cq); return result; }
public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials) { using (Profilers.ForCurrentThread().NewScope("ChannelSafeHandle.CreateCall")) { var result = Native.grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.Initialize(registry, cq); return result; } }
public static CallCredentialsSafeHandle CreateComposite(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2) { return pinvoke.grpcsharp_composite_call_credentials_create(creds1, creds2); }
public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials) { using (Profilers.ForCurrentThread().NewScope("ChannelSafeHandle.CreateCall")) { var result = grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.SetCompletionRegistry(registry); return(result); } }
static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials) { return grpcsharp_call_set_credentials(call, credentials); }
CallCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2) { return grpcsharp_composite_call_credentials_create(creds1, creds2); }
internal static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
internal static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
internal static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
public CallSafeHandle CreateCall(CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials) { var result = Native.grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.Initialize(cq); return(result); }
ChannelCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_channel_credentials_create( ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds) { return(grpcsharp_composite_channel_credentials_create(channelCreds, callCreds)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials) { return(grpcsharp_call_set_credentials(call, credentials)); }
CallCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2) { return(grpcsharp_composite_call_credentials_create(creds1, creds2)); }
public void SetCredentials(CallCredentialsSafeHandle credentials) { Native.grpcsharp_call_set_credentials(this, credentials).CheckOk(); }
static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
public static ChannelCredentialsSafeHandle CreateComposite(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds) { return(Native.grpcsharp_composite_channel_credentials_create(channelCreds, callCreds)); }
static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
ChannelCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_channel_credentials_create( ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds) { return grpcsharp_composite_channel_credentials_create(channelCreds, callCreds); }
public static CallCredentialsSafeHandle CreateComposite(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2) { return(Native.grpcsharp_composite_call_credentials_create(creds1, creds2)); }
public static ChannelCredentialsSafeHandle CreateComposite(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds) { return grpcsharp_composite_channel_credentials_create(channelCreds, callCreds); }
public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) { this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, "interceptor"); this.callbackRegistration = NativeCallbackDispatcher.RegisterCallback(HandleUniversalCallback); this.credentials = Native.grpcsharp_metadata_credentials_create_from_plugin(this.callbackRegistration.Tag); }