예제 #1
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 = Native.grpcsharp_metadata_credentials_create_from_plugin(nativeInterceptor);
        }
        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);
        }
예제 #3
0
 internal static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(NativeMetadataInterceptor interceptor);
예제 #4
0
 CallCredentialsSafeHandle IPlatformInvocation.grpcsharp_metadata_credentials_create_from_plugin(
     NativeMetadataInterceptor interceptor)
 {
     return grpcsharp_metadata_credentials_create_from_plugin(interceptor);
 }
예제 #5
0
 static extern CallCredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(NativeMetadataInterceptor interceptor);
예제 #6
0
 CallCredentialsSafeHandle IPlatformInvocation.grpcsharp_metadata_credentials_create_from_plugin(
     NativeMetadataInterceptor interceptor)
 {
     return(grpcsharp_metadata_credentials_create_from_plugin(interceptor));
 }