コード例 #1
0
        public static CredentialsSafeHandle CreateNullCredentials()
        {
            var creds = new CredentialsSafeHandle();

            creds.SetHandle(IntPtr.Zero);
            return(creds);
        }
コード例 #2
0
ファイル: ChannelSafeHandle.cs プロジェクト: gpndata/grpc
 public static ChannelSafeHandle CreateSecure(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)
 {
     // Increment reference count for the native gRPC environment to make sure we don't do grpc_shutdown() before destroying the server handle.
     // Doing so would make object finalizer crash if we end up abandoning the handle.
     GrpcEnvironment.GrpcNativeInit();
     return grpcsharp_secure_channel_create(credentials, target, channelArgs);
 }
コード例 #3
0
 public static ChannelSafeHandle CreateSecure(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)
 {
     // Increment reference count for the native gRPC environment to make sure we don't do grpc_shutdown() before destroying the server handle.
     // Doing so would make object finalizer crash if we end up abandoning the handle.
     GrpcEnvironment.GrpcNativeInit();
     return(grpcsharp_secure_channel_create(credentials, target, channelArgs));
 }
コード例 #4
0
        public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor)
        {
            this.interceptor = Preconditions.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 = grpcsharp_metadata_credentials_create_from_plugin(nativeInterceptor);
        }
コード例 #5
0
        public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor)
        {
            this.interceptor       = Preconditions.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 = grpcsharp_metadata_credentials_create_from_plugin(nativeInterceptor);
        }
コード例 #6
0
ファイル: ChannelSafeHandle.cs プロジェクト: hungle/grpc
 public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CredentialsSafeHandle 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;
     }
 }
コード例 #7
0
ファイル: CallSafeHandle.cs プロジェクト: venkiteswara/grpc
 public void SetCredentials(CredentialsSafeHandle credentials)
 {
     grpcsharp_call_set_credentials(this, credentials).CheckOk();
 }
コード例 #8
0
ファイル: ChannelSafeHandle.cs プロジェクト: jwatt/kythe
 public static ChannelSafeHandle CreateSecure(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)
 {
     return grpcsharp_secure_channel_create(credentials, target, channelArgs);
 }
コード例 #9
0
 static extern ChannelSafeHandle grpcsharp_secure_channel_create(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
コード例 #10
0
ファイル: ChannelSafeHandle.cs プロジェクト: gpndata/grpc
 static extern ChannelSafeHandle grpcsharp_secure_channel_create(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs);
コード例 #11
0
ファイル: CredentialsSafeHandle.cs プロジェクト: nkibler/grpc
 public static CredentialsSafeHandle CreateComposite(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2)
 {
     return grpcsharp_composite_credentials_create(creds1, creds2);
 }
コード例 #12
0
ファイル: ChannelSafeHandle.cs プロジェクト: muisaja7/grpc
 public static ChannelSafeHandle CreateSecure(CredentialsSafeHandle credentials, string target, ChannelArgsSafeHandle channelArgs)
 {
     return(grpcsharp_secure_channel_create(credentials, target, channelArgs));
 }
コード例 #13
0
ファイル: CallSafeHandle.cs プロジェクト: venkiteswara/grpc
 static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CredentialsSafeHandle credentials);
コード例 #14
0
ファイル: CallSafeHandle.cs プロジェクト: hungle/grpc
 public void SetCredentials(CredentialsSafeHandle credentials)
 {
     grpcsharp_call_set_credentials(this, credentials).CheckOk();
 }
コード例 #15
0
ファイル: CallSafeHandle.cs プロジェクト: hungle/grpc
 static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CredentialsSafeHandle credentials);
コード例 #16
0
 public static CredentialsSafeHandle CreateComposite(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2)
 {
     return(grpcsharp_composite_credentials_create(creds1, creds2));
 }
コード例 #17
0
 static extern CredentialsSafeHandle grpcsharp_composite_credentials_create(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2);
コード例 #18
0
 public static CredentialsSafeHandle CreateNullCredentials()
 {
     var creds = new CredentialsSafeHandle();
     creds.SetHandle(IntPtr.Zero);
     return creds;
 }
コード例 #19
0
        public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CredentialsSafeHandle credentials)
        {
            var result = grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline);

            if (credentials != null)
            {
                result.SetCredentials(credentials);
            }
            result.SetCompletionRegistry(registry);
            return(result);
        }
コード例 #20
0
ファイル: CredentialsSafeHandle.cs プロジェクト: nkibler/grpc
 static extern CredentialsSafeHandle grpcsharp_composite_credentials_create(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2);