Skip to content

Commit ab1f993

Browse files
committed
Expose ITransportConfiguration on non generic ITransport as well
1 parent c3fc0bb commit ab1f993

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Elastic.Transport/DistributedTransport.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public DistributedTransport(TConfiguration configuration)
6262
/// <inheritdoc cref="ITransport{TConfiguration}.Configuration"/>
6363
public TConfiguration Configuration { get; }
6464

65+
ITransportConfiguration ITransport.Configuration => Configuration;
66+
6567
/// <inheritdoc cref="ITransport.Request{TResponse}"/>
6668
public TResponse Request<TResponse>(
6769
in EndpointPath path,

src/Elastic.Transport/ITransport.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public Task<TResponse> RequestAsync<TResponse>(
5454
CancellationToken cancellationToken = default
5555
)
5656
where TResponse : TransportResponse, new();
57+
58+
/// <summary> The <see cref="ITransportConfiguration" /> in use by this transport instance </summary>
59+
public ITransportConfiguration Configuration { get; }
5760
}
5861

5962
/// <summary>
@@ -63,10 +66,8 @@ public Task<TResponse> RequestAsync<TResponse>(
6366
public interface ITransport<out TConfiguration> : ITransport
6467
where TConfiguration : class, ITransportConfiguration
6568
{
66-
/// <summary>
67-
/// The <see cref="ITransportConfiguration" /> in use by this transport instance
68-
/// </summary>
69-
public TConfiguration Configuration { get; }
69+
/// <summary> The <see cref="ITransportConfiguration" /> in use by this transport instance </summary>
70+
public new TConfiguration Configuration { get; }
7071
}
7172

7273
/// <summary>

0 commit comments

Comments
 (0)