Skip to content

Commit 87971df

Browse files
authored
GH-39335: [C#] Support creating FlightClient with Grpc.Core.Channel (#39348)
as well as Grpc.Net.Client.GrpcChannel by changing our constructor arg to Grpc.Core.ChannelBase which both classes inherit from. ### Rationale for this change ### What changes are included in this PR? Changing the constructor of C#'s Flight Client to take in a ChannelBase which allows for multiple implementations of gRPC channels to be passed in. ### Are these changes tested? Existing tests already cover the use but have also manually tested in a separate app ( ### Are there any user-facing changes? No as we're just changing the constructor to take in a parent/base class instead. * Closes: #39335 Authored-by: John Garland <[email protected]> Signed-off-by: Curt Hagenlocher <[email protected]>
1 parent a4a3d3f commit 87971df

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
using System.Threading.Tasks;
1717
using Apache.Arrow.Flight.Internal;
1818
using Apache.Arrow.Flight.Protocol;
19-
using Apache.Arrow.Flight.Server;
2019
using Apache.Arrow.Flight.Server.Internal;
2120
using Grpc.Core;
22-
using Grpc.Net.Client;
2321

2422
namespace Apache.Arrow.Flight.Client
2523
{
@@ -29,7 +27,7 @@ public class FlightClient
2927

3028
private readonly FlightService.FlightServiceClient _client;
3129

32-
public FlightClient(GrpcChannel grpcChannel)
30+
public FlightClient(ChannelBase grpcChannel)
3331
{
3432
_client = new FlightService.FlightServiceClient(grpcChannel);
3533
}

0 commit comments

Comments
 (0)