eerhardt commented on a change in pull request #12044: URL: https://github.com/apache/arrow/pull/12044#discussion_r777760677
########## File path: csharp/examples/FlightClientExample/Program.cs ########## @@ -0,0 +1,134 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Threading.Tasks; +using Grpc.Net.Client; +using Apache.Arrow.Flight.Client; +using Apache.Arrow.Flight; +using Apache.Arrow; +using System.Linq; +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Runtime.CompilerServices; +using System.Collections.Generic; + +namespace FlightClientExample +{ + public class Program + { + public static async Task Main(string[] args) + { + string host = args.Length > 0 ? args[0] : "localhost"; + string port = args.Length > 1 ? args[1] : "433"; + + CancellationTokenSource source = new CancellationTokenSource(); Review comment: Do we ever cancel this `CancellationTokenSource`? If not, can it be removed? ########## File path: csharp/examples/FlightAspServerExample/Services/GreeterService.cs ########## @@ -0,0 +1,36 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using Grpc.Core; +using FlightAspServerExample; + +namespace FlightAspServerExample.Services; + +public class GreeterService : Greeter.GreeterBase Review comment: Can we remove the `GreeterService`? I think it detracts from the example and isn't useful to the typical reader. ########## File path: csharp/examples/FlightAspServerExample/FlightAspServerExample.csproj ########## @@ -0,0 +1,39 @@ +<!--- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<Project Sdk="Microsoft.NET.Sdk.Web"> + + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <Nullable>enable</Nullable> + <ImplicitUsings>enable</ImplicitUsings> + <LangVersion>10</LangVersion> + </PropertyGroup> + + <ItemGroup> + <Protobuf Include="Protos\greet.proto" GrpcServices="Server" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Grpc.AspNetCore" Version="2.40.0" /> + <PackageReference Include="Apache.Arrow.Flight" Version="6.0.1" /> Review comment: I think this should be a `ProjectReference` instead. That way it is always using the latest bits and we don't have to constantly update the version here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org