44
55namespace Ydb . Sdk ;
66
7- public interface IDriver : IAsyncDisposable , IDisposable
7+ internal interface IDriver : IAsyncDisposable , IDisposable
88{
9- internal Task < TResponse > UnaryCall < TRequest , TResponse > (
9+ Task < TResponse > UnaryCall < TRequest , TResponse > (
1010 Method < TRequest , TResponse > method ,
1111 TRequest request ,
1212 GrpcRequestSettings settings )
1313 where TRequest : class
1414 where TResponse : class ;
1515
16- internal ServerStream < TResponse > ServerStreamCall < TRequest , TResponse > (
16+ ServerStream < TResponse > ServerStreamCall < TRequest , TResponse > (
1717 Method < TRequest , TResponse > method ,
1818 TRequest request ,
1919 GrpcRequestSettings settings )
2020 where TRequest : class
2121 where TResponse : class ;
2222
23- internal BidirectionalStream < TRequest , TResponse > BidirectionalStreamCall < TRequest , TResponse > (
23+ BidirectionalStream < TRequest , TResponse > BidirectionalStreamCall < TRequest , TResponse > (
2424 Method < TRequest , TResponse > method ,
2525 GrpcRequestSettings settings )
2626 where TRequest : class
@@ -33,6 +33,7 @@ public abstract class BaseDriver : IDriver
3333{
3434 protected readonly DriverConfig Config ;
3535 protected readonly ILogger Logger ;
36+ protected readonly ILoggerFactory LoggerFactory ;
3637
3738 protected int Disposed ;
3839
@@ -43,7 +44,7 @@ protected BaseDriver(DriverConfig config, ILoggerFactory loggerFactory, ILogger
4344 LoggerFactory = loggerFactory ;
4445 }
4546
46- public async Task < TResponse > UnaryCall < TRequest , TResponse > (
47+ async Task < TResponse > IDriver . UnaryCall < TRequest , TResponse > (
4748 Method < TRequest , TResponse > method ,
4849 TRequest request ,
4950 GrpcRequestSettings settings )
@@ -155,7 +156,7 @@ protected CallOptions GetCallOptions(GrpcRequestSettings settings, bool streamin
155156 return options ;
156157 }
157158
158- public ILoggerFactory LoggerFactory { get ; }
159+ ILoggerFactory IDriver . LoggerFactory => LoggerFactory ;
159160
160161 public void Dispose ( )
161162 {
@@ -166,6 +167,8 @@ public async ValueTask DisposeAsync()
166167 {
167168 if ( Interlocked . CompareExchange ( ref Disposed , 1 , 0 ) == 0 )
168169 {
170+ GC . SuppressFinalize ( this ) ;
171+
169172 await InternalDispose ( ) ;
170173 }
171174 }
0 commit comments