Пример #1
0
        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);
        }
Пример #2
0
 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;
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
 public static CallCredentialsSafeHandle CreateComposite(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)
 {
     return pinvoke.grpcsharp_composite_call_credentials_create(creds1, creds2);
 }
Пример #5
0
 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);
Пример #7
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call,
     CallCredentialsSafeHandle credentials)
 {
     return grpcsharp_call_set_credentials(call, credentials);
 }
Пример #8
0
 CallCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2)
 {
     return grpcsharp_composite_call_credentials_create(creds1, creds2);
 }
Пример #9
0
 internal static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
Пример #10
0
 internal static extern ChannelCredentialsSafeHandle grpcsharp_composite_channel_credentials_create(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds);
Пример #11
0
 internal static extern CallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
Пример #12
0
        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);
        }
Пример #13
0
 ChannelCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_channel_credentials_create(
     ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)
 {
     return(grpcsharp_composite_channel_credentials_create(channelCreds, callCreds));
 }
Пример #14
0
 GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call,
                                                                  CallCredentialsSafeHandle credentials)
 {
     return(grpcsharp_call_set_credentials(call, credentials));
 }
Пример #15
0
 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();
 }
Пример #17
0
 static extern CallCredentialsSafeHandle grpcsharp_composite_call_credentials_create(CallCredentialsSafeHandle creds1, CallCredentialsSafeHandle creds2);
Пример #18
0
 public static ChannelCredentialsSafeHandle CreateComposite(ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)
 {
     return(Native.grpcsharp_composite_channel_credentials_create(channelCreds, callCreds));
 }
Пример #19
0
 static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
Пример #20
0
 public void SetCredentials(CallCredentialsSafeHandle credentials)
 {
     Native.grpcsharp_call_set_credentials(this, credentials).CheckOk();
 }
Пример #21
0
 ChannelCredentialsSafeHandle IPlatformInvocation.grpcsharp_composite_channel_credentials_create(
     ChannelCredentialsSafeHandle channelCreds, CallCredentialsSafeHandle callCreds)
 {
     return grpcsharp_composite_channel_credentials_create(channelCreds, callCreds);
 }
Пример #22
0
 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);
 }