├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── ask_question.md │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md └── workflows │ └── test.yml ├── .gitignore ├── AUTHORS ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── Directory.Build.props ├── Directory.Build.targets ├── Directory.Packages.props ├── GOVERNANCE.md ├── Grpc.DotNet.ruleset ├── Grpc.DotNet.slnx ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── TROUBLESHOOTING.md ├── activate.ps1 ├── activate.sh ├── build ├── expand_dev_version.sh ├── get-dotnet.ps1 ├── get-dotnet.sh ├── update_grpc_core_api_version.sh └── version.props ├── build_and_test.sh ├── doc ├── images │ └── packages.png ├── implementation_comparison.md ├── packages.md ├── planning.md ├── release_process.md └── versioning.md ├── docfx ├── .gitignore ├── README.md ├── docfx.json ├── generate_reference_docs.sh └── toc.yml ├── docker-compose.yml ├── examples ├── Aggregator │ ├── Aggregator.slnx │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ ├── aggregate.proto │ │ ├── count.proto │ │ └── greet.proto │ └── Server │ │ ├── IncrementingCounter.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ ├── AggregatorService.cs │ │ ├── CounterService.cs │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Blazor │ ├── Blazor.slnx │ ├── Client │ │ ├── App.razor │ │ ├── Client.csproj │ │ ├── Messages │ │ │ └── WeatherForecast.cs │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── FetchData.razor │ │ │ └── Index.razor │ │ ├── Program.cs │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── NavMenu.razor │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ └── wwwroot │ │ │ ├── appsettings.json │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ ├── grpc-logo.png │ │ │ └── index.html │ ├── Proto │ │ ├── count.proto │ │ └── weather.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ ├── CounterService.cs │ │ └── WeatherService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Browser │ ├── Browser.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ ├── .gitignore │ │ ├── Scripts │ │ ├── README.md │ │ ├── greet_grpc_web_pb.js │ │ ├── greet_pb.js │ │ └── index.js │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── package-lock.json │ │ └── package.json ├── Certifier │ ├── Certifier.slnx │ ├── Client │ │ ├── Certs │ │ │ └── client.pfx │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── certify.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── CertifierService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Channeler │ ├── Channeler.slnx │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── data_channel.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── DataChannelerService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Coder │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Coder.slnx │ ├── Server │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── Shared │ │ ├── HelloReply.cs │ │ ├── HelloRequest.cs │ │ ├── IGreeterService.cs │ │ └── Shared.csproj ├── Compressor │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Compressor.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Container │ ├── Backend │ │ ├── Backend.csproj │ │ ├── Dockerfile │ │ ├── Program.cs │ │ ├── Services │ │ │ └── WeatherService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── Container.slnx │ ├── Frontend │ │ ├── App.razor │ │ ├── Balancer │ │ │ ├── BalancerConfiguration.cs │ │ │ ├── ConfigurableResolverFactory.cs │ │ │ ├── ReportingChannelControlHelper.cs │ │ │ ├── ReportingLoadBalancerFactory.cs │ │ │ ├── ReportingSetup.cs │ │ │ └── SubchannelReporter.cs │ │ ├── Dockerfile │ │ ├── Frontend.csproj │ │ ├── Messages │ │ │ └── WeatherForecast.cs │ │ ├── Pages │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Shared │ │ │ ├── BalancerDialog.razor │ │ │ ├── MainLayout.razor │ │ │ ├── MainLayout.razor.css │ │ │ ├── NavMenu.razor │ │ │ ├── NavMenu.razor.css │ │ │ └── SurveyPrompt.razor │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ └── grpc-logo.png │ ├── Kubernetes │ │ ├── deploy-backend.yml │ │ └── deploy-frontend.yml │ ├── Proto │ │ └── weather.proto │ ├── deploy.ps1 │ └── docker-compose.yml ├── Counter │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Counter.slnx │ ├── Proto │ │ └── count.proto │ └── Server │ │ ├── IncrementingCounter.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── CounterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Downloader │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Downloader.slnx │ ├── Proto │ │ └── download.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── DownloaderService.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── pancakes.jpg │ │ └── pancakes4.png ├── Error │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Error.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── GrpcValidation.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Frameworker │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Frameworker.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Greeter │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Greeter.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Interceptor │ ├── Client │ │ ├── Client.csproj │ │ ├── ClientLoggerInterceptor.cs │ │ └── Program.cs │ ├── Interceptor.slnx │ ├── Proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── ServerLoggerInterceptor.cs │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Liber │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Common │ │ ├── Common.csproj │ │ └── Name.cs │ ├── Liber.slnx │ ├── Proto │ │ ├── common.proto │ │ └── greet.proto │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Locator │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Locator.slnx │ ├── Proto │ │ ├── external.proto │ │ └── internal.proto │ └── Server │ │ ├── Program.cs │ │ ├── Server.csproj │ │ ├── Services │ │ ├── ExternalService.cs │ │ └── InternalService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Mailer │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Mailer.slnx │ ├── Proto │ │ └── mail.proto │ └── Server │ │ ├── MailQueue.cs │ │ ├── MailQueueRepository.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── MailerService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Progressor │ ├── Client │ │ ├── Client.csproj │ │ ├── HistoryResponse.cs │ │ ├── Program.cs │ │ └── ResponseProgress │ │ │ ├── IProgressMessage.cs │ │ │ └── ResponseProgress.cs │ ├── Progressor.slnx │ ├── Proto │ │ └── progress.proto │ └── Server │ │ ├── Monarchs-of-England.txt │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── ProgressorService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── README.md ├── Racer │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── race.proto │ ├── Racer.slnx │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── RacerService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Reflector │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── greet.proto │ ├── Reflector.slnx │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Retrier │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── retry.proto │ ├── Retrier.slnx │ └── Server │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ └── RetrierService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── Spar │ ├── Proto │ │ └── greet.proto │ ├── Server │ │ ├── ClientApp │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── App.vue │ │ │ │ ├── custom.d.ts │ │ │ │ ├── generated │ │ │ │ │ ├── greet_grpc_web_pb.js │ │ │ │ │ └── greet_pb.js │ │ │ │ ├── index.html │ │ │ │ └── index.ts │ │ │ └── tsconfig.json │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ └── favicon.ico │ └── Spar.slnx ├── Tester │ ├── Client │ │ ├── Client.csproj │ │ ├── GreetRepository.cs │ │ ├── IGreetRepository.cs │ │ ├── Program.cs │ │ ├── Worker.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── Common │ │ └── Common.csproj │ ├── Proto │ │ └── test.proto │ ├── Server │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ │ ├── Greeter.cs │ │ │ ├── IGreeter.cs │ │ │ └── TesterService.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── Tester.slnx │ └── Tests │ │ ├── Client │ │ ├── Helpers │ │ │ └── CallHelpers.cs │ │ └── WorkerTests.cs │ │ ├── Server │ │ ├── IntegrationTests │ │ │ ├── GreeterServiceTests.cs │ │ │ ├── Helpers │ │ │ │ ├── ForwardingLoggerProvider.cs │ │ │ │ ├── GrpcTestContext.cs │ │ │ │ └── GrpcTestFixture.cs │ │ │ ├── IntegrationTestBase.cs │ │ │ └── MockedGreeterServiceTests.cs │ │ └── UnitTests │ │ │ ├── GreeterServiceTests.cs │ │ │ └── Helpers │ │ │ ├── TestAsyncStreamReader.cs │ │ │ ├── TestServerCallContext.cs │ │ │ └── TestServerStreamWriter.cs │ │ └── Tests.csproj ├── Ticketer │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Proto │ │ └── ticket.proto │ ├── Server │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── TicketerService.cs │ │ ├── TicketRepository.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── Ticketer.slnx ├── Transcoder │ ├── Proto │ │ ├── google │ │ │ └── api │ │ │ │ ├── annotations.proto │ │ │ │ └── http.proto │ │ └── greet.proto │ ├── Server │ │ ├── Program.cs │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── favicon.ico │ │ │ ├── images │ │ │ └── grpc-rest-logo.png │ │ │ ├── index.html │ │ │ └── lib │ │ │ └── bootstrap │ │ │ └── dist │ │ │ ├── bootstrap.bundle.min.js │ │ │ └── bootstrap.min.css │ └── Transcoder.slnx ├── Transporter │ ├── Client │ │ ├── Client.csproj │ │ ├── Program.cs │ │ └── UnixDomainSocketConnectionFactory.cs │ ├── Proto │ │ └── greet.proto │ ├── Server │ │ ├── Program.cs │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── GreeterService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── Transporter.slnx ├── Uploader │ ├── Client │ │ ├── Client.csproj │ │ ├── Program.cs │ │ └── pancakes.jpg │ ├── Proto │ │ └── upload.proto │ ├── Server │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── Services │ │ │ └── UploaderService.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── Uploader.slnx ├── Vigor │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Server │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Server.csproj │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── Vigor.slnx └── Worker │ ├── Client │ ├── Client.csproj │ ├── Program.cs │ ├── Worker.cs │ ├── appsettings.Development.json │ └── appsettings.json │ ├── Proto │ └── count.proto │ ├── Server │ ├── IncrementingCounter.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Server.csproj │ ├── Services │ │ └── CounterService.cs │ ├── appsettings.Development.json │ └── appsettings.json │ └── Worker.slnx ├── global.json ├── grpcweb_interoptests.sh ├── keys ├── Grpc.public.snk ├── Grpc.snk └── README.md ├── kokoro ├── README.md ├── build_nuget.cfg ├── build_nuget.sh ├── interop.cfg ├── interop.sh ├── linux.cfg ├── publish_nuget.cfg └── publish_nuget.sh ├── microsoft-support.md ├── nuget.config ├── packageIcon.png ├── perf ├── Grpc.AspNetCore.Microbenchmarks │ ├── Client │ │ ├── CompressedUnaryClientBenchmark.cs │ │ ├── UnaryClientBenchmark.cs │ │ └── UnaryClientBenchmarkBase.cs │ ├── DefaultCoreConfig.cs │ ├── DefaultCoreConfigAttribute.cs │ ├── Grpc.AspNetCore.Microbenchmarks.csproj │ ├── Internal │ │ ├── ForceAsyncAwaiter.cs │ │ ├── MessageHelpers.cs │ │ ├── TestCompressionProvider.cs │ │ ├── TestGrpcInterceptorActivator.cs │ │ ├── TestGrpcServiceActivator.cs │ │ ├── TestHttpResposneTrailersFeature.cs │ │ ├── TestPipeReader.cs │ │ ├── TestPipeWriter.cs │ │ ├── TestService.cs │ │ └── UnaryAwaitInterceptor.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Proto │ │ ├── chat.proto │ │ └── greet.proto │ └── Server │ │ ├── CompressedUnaryServerCallHandlerBenchmark.cs │ │ ├── DeadlineUnaryServerCallHandlerBenchmark.cs │ │ ├── FailureStatusUnaryServerCallHandlerBenchmark.cs │ │ ├── InterceptedUnaryServerCallHandlerBenchmark.cs │ │ ├── PipelinesUnaryServerCallHandlerBenchmark.cs │ │ ├── UnaryServerCallHandlerBenchmark.cs │ │ └── UnaryServerCallHandlerBenchmarkBase.cs └── benchmarkapps │ ├── GrpcAspNetCoreServer │ ├── Controllers │ │ └── BenchmarkController.cs │ ├── GrpcAspNetCoreServer.csproj │ ├── Program.cs │ ├── RunGrpcServer.ps1 │ ├── Startup.cs │ ├── grpc-aspnetcore-server.yml │ └── hosting.json │ ├── GrpcClient │ ├── Certs │ │ ├── README.md │ │ ├── ca.crt │ │ ├── ca.key │ │ ├── client.crt │ │ ├── client.key │ │ ├── server.crt │ │ └── server.key │ ├── ClientOptions.cs │ ├── GrpcClient.csproj │ ├── GrpcClientType.cs │ ├── NamedPipeConnectionFactory.cs │ ├── Program.cs │ ├── RunGrpcClient.ps1 │ ├── UnixDomainSocketConnectionFactory.cs │ └── grpc-client.yml │ ├── GrpcCoreServer │ ├── GrpcCoreServer.csproj │ ├── Program.cs │ ├── grpc-core-server.yml │ └── hosting.json │ ├── QpsWorker │ ├── Infrastructure │ │ ├── AtomicCounter.cs │ │ ├── ClientRunner.cs │ │ ├── ConfigHelpers.cs │ │ ├── GenericService.cs │ │ ├── GenericServiceMethodProvider.cs │ │ ├── Histogram.cs │ │ ├── InterarrivalTimers.cs │ │ ├── ServerRunner.cs │ │ └── TimeStats.cs │ ├── Program.cs │ ├── Protos │ │ ├── README.md │ │ ├── core │ │ │ └── stats.proto │ │ └── testing │ │ │ ├── benchmark_service.proto │ │ │ ├── control.proto │ │ │ ├── messages.proto │ │ │ ├── payloads.proto │ │ │ ├── stats.proto │ │ │ └── worker_service.proto │ ├── QpsWorker.csproj │ ├── Services │ │ └── WorkerServiceImpl.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── worker-start-client.ps1 │ └── worker-start-server.ps1 │ ├── README.md │ └── Shared │ ├── BenchmarkConfigurationHelpers.cs │ ├── BenchmarkServiceImpl.cs │ ├── Certs │ ├── README.md │ ├── ca.pem │ ├── client.pfx │ ├── server1.key │ ├── server1.pem │ └── server1.pfx │ ├── ServiceProvidersMiddleware.cs │ ├── benchmark_service.proto │ └── messages.proto ├── src ├── Grpc.AspNetCore.HealthChecks │ ├── Grpc.AspNetCore.HealthChecks.csproj │ ├── GrpcHealthChecksEndpointRouteBuilderExtensions.cs │ ├── GrpcHealthChecksOptions.cs │ ├── GrpcHealthChecksPublisher.cs │ ├── GrpcHealthChecksServiceExtensions.cs │ ├── HealthCheckMapContext.cs │ ├── HealthResult.cs │ ├── Internal │ │ ├── HealthChecksStatusHelpers.cs │ │ └── HealthServiceIntegration.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ ├── ServiceMapping.cs │ └── ServiceMappingCollection.cs ├── Grpc.AspNetCore.Server.ClientFactory │ ├── ContextPropagationInterceptor.cs │ ├── Grpc.AspNetCore.Server.ClientFactory.csproj │ ├── GrpcContextPropagationOptions.cs │ ├── GrpcServerHttpClientBuilderExtensions.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Grpc.AspNetCore.Server.Reflection │ ├── Grpc.AspNetCore.Server.Reflection.csproj │ ├── GrpcReflectionEndpointRouteBuilderExtensions.cs │ ├── GrpcReflectionMarkerService.cs │ ├── GrpcReflectionServiceExtensions.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Grpc.AspNetCore.Server │ ├── Grpc.AspNetCore.Server.csproj │ ├── GrpcActivatorHandle.cs │ ├── GrpcEndpointRouteBuilderExtensions.cs │ ├── GrpcMethodMetadata.cs │ ├── GrpcServiceEndpointConventionBuilder.cs │ ├── GrpcServiceExtensions.cs │ ├── GrpcServiceOptions.cs │ ├── IGrpcInterceptorActivator.T.cs │ ├── IGrpcInterceptorActivator.cs │ ├── IGrpcServerBuilder.cs │ ├── IGrpcServiceActivator.cs │ ├── IServerCallContextFeature.cs │ ├── InterceptorCollection.cs │ ├── InterceptorRegistration.cs │ ├── Internal │ │ ├── CallHandlers │ │ │ ├── ClientStreamingServerCallHandler.cs │ │ │ ├── DuplexStreamingServerCallHandler.cs │ │ │ ├── ServerCallHandlerBase.cs │ │ │ ├── ServerStreamingServerCallHandler.cs │ │ │ └── UnaryServerCallHandler.cs │ │ ├── DefaultGrpcInterceptorActivator.cs │ │ ├── DefaultGrpcServiceActivator.cs │ │ ├── ErrorMessageHelper.cs │ │ ├── GrpcEventSource.cs │ │ ├── GrpcMarkerService.cs │ │ ├── GrpcProtocolConstants.cs │ │ ├── GrpcProtocolHelpers.cs │ │ ├── GrpcServerBuilder.cs │ │ ├── GrpcServerConstants.cs │ │ ├── GrpcServerLog.cs │ │ ├── GrpcServiceOptionsSetup.cs │ │ ├── HttpContextSerializationContext.cs │ │ ├── HttpContextServerCallContext.cs │ │ ├── HttpContextStreamReader.cs │ │ ├── HttpContextStreamWriter.cs │ │ ├── HttpResponseExtensions.cs │ │ ├── ISystemClock.cs │ │ ├── PercentEncodingHelpers.cs │ │ ├── PipeExtensions.cs │ │ ├── ReadOnlySequenceStream.cs │ │ ├── ServerCallDeadlineManager.cs │ │ ├── ServerCallHandlerFactory.cs │ │ ├── StatusCodeExtensions.cs │ │ ├── SystemClock.cs │ │ ├── ValueTaskExtensions.cs │ │ └── X509CertificateHelpers.cs │ ├── Model │ │ ├── IServiceMethodProvider.cs │ │ ├── Internal │ │ │ ├── BinderServiceModelProvider.cs │ │ │ ├── GrpcUnimplementedConstraint.cs │ │ │ ├── MethodModel.cs │ │ │ ├── ProviderServiceBinder.cs │ │ │ ├── ServiceMethodsRegistry.cs │ │ │ └── ServiceRouteBuilder.cs │ │ ├── ServerMethods.cs │ │ └── ServiceMethodProviderContext.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ └── ServerCallContextExtensions.cs ├── Grpc.AspNetCore.Web │ ├── DisableGrpcWebAttribute.cs │ ├── EnableGrpcWebAttribute.cs │ ├── Grpc.AspNetCore.Web.csproj │ ├── GrpcWebApplicationBuilderExtensions.cs │ ├── GrpcWebEndpointConventionBuilderExtensions.cs │ ├── GrpcWebOptions.cs │ ├── IGrpcWebEnabledMetadata.cs │ ├── Internal │ │ ├── Base64PipeReader.cs │ │ ├── Base64PipeWriter.cs │ │ ├── GrpcWebFeature.cs │ │ ├── GrpcWebMiddleware.cs │ │ ├── GrpcWebProtocolConstants.cs │ │ ├── GrpcWebProtocolHelpers.cs │ │ ├── HttpCharacters.cs │ │ ├── MemorySegment.cs │ │ └── ServerGrpcWebMode.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── README.md ├── Grpc.AspNetCore │ ├── Grpc.AspNetCore.csproj │ ├── README.md │ └── lib │ │ ├── net6.0 │ │ └── _._ │ │ ├── net7.0 │ │ └── _._ │ │ ├── net8.0 │ │ └── _._ │ │ └── net9.0 │ │ └── _._ ├── Grpc.Auth │ ├── GoogleAuthInterceptors.cs │ ├── GoogleGrpcCredentials.cs │ ├── Grpc.Auth.csproj │ └── README.md ├── Grpc.Core.Api │ ├── AsyncAuthInterceptor.cs │ ├── AsyncCallState.cs │ ├── AsyncClientStreamingCall.cs │ ├── AsyncDuplexStreamingCall.cs │ ├── AsyncServerStreamingCall.cs │ ├── AsyncStreamReaderExtensions.cs │ ├── AsyncUnaryCall.cs │ ├── AuthContext.cs │ ├── AuthProperty.cs │ ├── BindServiceMethodAttribute.cs │ ├── CallCredentials.cs │ ├── CallCredentialsConfiguratorBase.cs │ ├── CallFlags.cs │ ├── CallInvoker.cs │ ├── CallOptions.cs │ ├── ChannelBase.cs │ ├── ChannelCredentials.cs │ ├── ChannelCredentialsConfiguratorBase.cs │ ├── ClientBase.cs │ ├── ContextPropagationOptions.cs │ ├── ContextPropagationToken.cs │ ├── DeserializationContext.cs │ ├── Grpc.Core.Api.csproj │ ├── IAsyncStreamReader.cs │ ├── IAsyncStreamWriter.cs │ ├── IClientStreamWriter.cs │ ├── IServerStreamWriter.cs │ ├── Interceptors │ │ ├── CallInvokerExtensions.cs │ │ ├── ChannelExtensions.cs │ │ ├── ClientInterceptorContext.cs │ │ ├── InterceptingCallInvoker.cs │ │ └── Interceptor.cs │ ├── Internal │ │ ├── CallDebuggerHelpers.cs │ │ ├── ClientDebuggerHelpers.cs │ │ └── UnimplementedCallInvoker.cs │ ├── KeyCertificatePair.cs │ ├── Marshaller.cs │ ├── Metadata.cs │ ├── Method.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ ├── RpcException.cs │ ├── SerializationContext.cs │ ├── ServerCallContext.cs │ ├── ServerMethods.cs │ ├── ServerServiceDefinition.cs │ ├── ServiceBinderBase.cs │ ├── SslCredentials.cs │ ├── Status.cs │ ├── StatusCode.cs │ ├── Utils │ │ ├── EncodingExtensions.cs │ │ └── GrpcPreconditions.cs │ ├── VerifyPeerContext.cs │ ├── VersionInfo.cs │ └── WriteOptions.cs ├── Grpc.HealthCheck │ ├── Grpc.HealthCheck.csproj │ ├── HealthServiceImpl.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── README.md │ └── health.proto ├── Grpc.Net.Client.Web │ ├── Grpc.Net.Client.Web.csproj │ ├── GrpcWebHandler.cs │ ├── GrpcWebMode.cs │ ├── Internal │ │ ├── Base64RequestStream.cs │ │ ├── Base64ResponseStream.cs │ │ ├── GrpcWebProtocolConstants.cs │ │ ├── GrpcWebRequestContent.cs │ │ ├── GrpcWebResponseContent.cs │ │ ├── GrpcWebResponseStream.cs │ │ ├── OperatingSystem.cs │ │ └── StreamHelpers.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── README.md ├── Grpc.Net.Client │ ├── Balancer │ │ ├── BalancerAddress.cs │ │ ├── BalancerAttributes.cs │ │ ├── BalancerAttributesKey.cs │ │ ├── BalancerState.cs │ │ ├── ChannelState.cs │ │ ├── CompletionContext.cs │ │ ├── DnsResolver.cs │ │ ├── IBackoffPolicy.cs │ │ ├── IChannelControlHelper.cs │ │ ├── ISubchannelCallTracker.cs │ │ ├── Internal │ │ │ ├── BalancerAddressEqualityComparer.cs │ │ │ ├── BalancerHttpHandler.cs │ │ │ ├── ChannelIdProvider.cs │ │ │ ├── ChildHandlerLoadBalancer.cs │ │ │ ├── ConnectionManager.cs │ │ │ ├── EmptyPicker.cs │ │ │ ├── ErrorPicker.cs │ │ │ ├── ExponentialBackoffPolicy.cs │ │ │ ├── ISubchannelTransport.cs │ │ │ ├── PassiveSubchannelTransport.cs │ │ │ ├── SocketConnectivitySubchannelTransport.cs │ │ │ └── StreamWrapper.cs │ │ ├── LoadBalancer.cs │ │ ├── LoadBalancerOptions.cs │ │ ├── PickContext.cs │ │ ├── PickFirstBalancer.cs │ │ ├── PickResult.cs │ │ ├── PollingResolver.cs │ │ ├── Resolver.cs │ │ ├── ResolverFactory.cs │ │ ├── ResolverOptions.cs │ │ ├── RoundRobinBalancer.cs │ │ ├── StaticResolver.cs │ │ ├── Subchannel.cs │ │ ├── SubchannelOptions.cs │ │ ├── SubchannelPicker.cs │ │ ├── SubchannelState.cs │ │ └── SubchannelsLoadBalancer.cs │ ├── Configuration │ │ ├── ConfigObject.cs │ │ ├── HedgingPolicy.cs │ │ ├── LoadBalancingConfig.cs │ │ ├── MethodConfig.cs │ │ ├── MethodName.cs │ │ ├── PickFirstConfig.cs │ │ ├── RetryPolicy.cs │ │ ├── RetryThrottlingPolicy.cs │ │ ├── RoundRobinConfig.cs │ │ └── ServiceConfig.cs │ ├── Grpc.Net.Client.csproj │ ├── GrpcChannel.cs │ ├── GrpcChannelOptions.cs │ ├── Internal │ │ ├── ArrayBufferWriter.cs │ │ ├── CachedDebugger.cs │ │ ├── ClientStreamWriterBase.cs │ │ ├── Configuration │ │ │ ├── ConfigProperty.cs │ │ │ ├── ConvertHelpers.cs │ │ │ ├── IConfigValue.cs │ │ │ └── Values.cs │ │ ├── DefaultCallCredentialsConfigurator.cs │ │ ├── DefaultChannelCredentialsConfigurator.cs │ │ ├── GrpcCall.NonGeneric.cs │ │ ├── GrpcCall.cs │ │ ├── GrpcCallLog.cs │ │ ├── GrpcCallScope.cs │ │ ├── GrpcCallSerializationContext.cs │ │ ├── GrpcDiagnostics.cs │ │ ├── GrpcEventSource.cs │ │ ├── GrpcMethodInfo.cs │ │ ├── GrpcProtocolConstants.cs │ │ ├── GrpcProtocolHelpers.cs │ │ ├── Http │ │ │ ├── PushStreamContent.cs │ │ │ ├── PushUnaryContent.cs │ │ │ └── WinHttpUnaryContent.cs │ │ ├── HttpClientCallInvoker.cs │ │ ├── HttpContentClientStreamReader.cs │ │ ├── HttpContentClientStreamWriter.cs │ │ ├── IDebugger.cs │ │ ├── IGrpcCall.cs │ │ ├── ISystemClock.cs │ │ ├── IsExternalInit.cs │ │ ├── Native.cs │ │ ├── OperatingSystem.cs │ │ ├── RandomGenerator.cs │ │ ├── Retry │ │ │ ├── ChannelRetryThrottling.cs │ │ │ ├── CommitReason.cs │ │ │ ├── HedgingCall.cs │ │ │ ├── RetryCall.cs │ │ │ ├── RetryCallBase.cs │ │ │ ├── RetryCallBaseClientStreamReader.cs │ │ │ ├── RetryCallBaseClientStreamWriter.cs │ │ │ ├── RetryCallBaseLog.cs │ │ │ └── StatusGrpcCall.cs │ │ ├── RuntimeHelpers.cs │ │ ├── StreamExtensions.cs │ │ ├── SystemClock.cs │ │ ├── TaskExtensions.cs │ │ ├── ThreadSafeLookup.cs │ │ └── UserAgentGenerator.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── README.md ├── Grpc.Net.ClientFactory │ ├── CallOptionsContext.cs │ ├── Grpc.Net.ClientFactory.csproj │ ├── GrpcClientFactory.cs │ ├── GrpcClientFactoryOptions.cs │ ├── GrpcClientServiceExtensions.cs │ ├── GrpcHttpClientBuilderExtensions.cs │ ├── InterceptorRegistration.cs │ ├── InterceptorScope.cs │ ├── Internal │ │ ├── CallOptionsConfigurationInvoker.cs │ │ ├── DefaultClientActivator.cs │ │ ├── DefaultGrpcClientFactory.cs │ │ ├── GrpcCallInvokerFactory.cs │ │ ├── GrpcClientMappingRegistry.cs │ │ └── TypeNameHelper.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── README.md ├── Grpc.Net.Common │ ├── AsyncStreamReaderExtensions.cs │ ├── Compression │ │ ├── DeflateCompressionProvider.cs │ │ ├── GzipCompressionProvider.cs │ │ └── ICompressionProvider.cs │ ├── ConnectivityState.cs │ └── Grpc.Net.Common.csproj ├── Grpc.Reflection │ ├── Grpc.Reflection.csproj │ ├── README.md │ ├── Reflection.cs │ ├── ReflectionGrpc.cs │ ├── ReflectionServiceImpl.cs │ └── SymbolRegistry.cs ├── Grpc.StatusProto │ ├── ExceptionExtensions.cs │ ├── Grpc.StatusProto.csproj │ ├── MetadataExtensions.cs │ ├── README.md │ ├── RpcExceptionExtensions.cs │ └── RpcStatusExtensions.cs ├── Shared │ ├── CallerArgumentExpressionAttribute.cs │ ├── CodeAnalysisAttributes.cs │ ├── CommonGrpcProtocolHelpers.cs │ ├── CompatibilityHelpers.cs │ ├── DefaultDeserializationContext.cs │ ├── Http2ErrorCode.cs │ ├── Http3ErrorCode.cs │ ├── HttpHandlerFactory.cs │ ├── HttpRequestHelpers.cs │ ├── IsExternalInit.cs │ ├── NonCapturingTimer.cs │ ├── NonDisposableMemoryStream.cs │ ├── NullableAttributes.cs │ ├── Server │ │ ├── BindMethodFinder.cs │ │ ├── ClientStreamingServerMethodInvoker.cs │ │ ├── DuplexStreamingServerMethodInvoker.cs │ │ ├── InterceptorPipelineBuilder.cs │ │ ├── MethodOptions.cs │ │ ├── ServerMethodInvokerBase.cs │ │ ├── ServerStreamingServerMethodInvoker.cs │ │ └── UnaryServerMethodInvoker.cs │ ├── ThrowHelpers │ │ ├── ArgumentNullThrowHelper.cs │ │ ├── ArgumentOutOfRangeThrowHelper.cs │ │ └── ObjectDisposedThrowHelper.cs │ └── TrailingHeadersHelpers.cs └── dotnet-grpc │ ├── Commands │ ├── AddFileCommand.cs │ ├── AddUrlCommand.cs │ ├── CommandBase.cs │ ├── ListCommand.cs │ ├── RefreshCommand.cs │ └── RemoveCommand.cs │ ├── Internal │ ├── CLIToolException.cs │ ├── ConsoleExtensions.cs │ └── GrpcDependencyAttribute.cs │ ├── Options │ ├── Access.cs │ ├── CommonOptions.cs │ └── Services.cs │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── CoreStrings.Designer.cs │ └── CoreStrings.resx │ └── dotnet-grpc.csproj ├── startvs.cmd ├── test ├── Directory.Build.props ├── FunctionalTests │ ├── Balancer │ │ ├── BalancerHelpers.cs │ │ ├── ConnectionTests.cs │ │ ├── DnsResolverTests.cs │ │ ├── LeastUsedBalancer.cs │ │ ├── LeastUsedBalancerTests.cs │ │ ├── PickFirstBalancerTests.cs │ │ └── RoundRobinBalancerTests.cs │ ├── Client │ │ ├── AuthorizationTests.cs │ │ ├── CancellationTests.cs │ │ ├── ClientFactoryTests.cs │ │ ├── CompressionTests.cs │ │ ├── ConnectionTests.cs │ │ ├── DeadlineTests.cs │ │ ├── EventSourceTests.cs │ │ ├── HedgingTests.cs │ │ ├── InterceptorTests.cs │ │ ├── MaxMessageSizeTests.cs │ │ ├── MetadataTests.cs │ │ ├── RetryTests.cs │ │ ├── StreamingTests.cs │ │ ├── TelemetryTests.cs │ │ └── UnaryTests.cs │ ├── FunctionalTestBase.cs │ ├── Grpc.AspNetCore.FunctionalTests.csproj │ ├── Infrastructure │ │ ├── DynamicGrpcServiceRegistry.cs │ │ ├── ExecutionContextLoggingProvider.cs │ │ ├── GrpcHttpHelper.cs │ │ ├── GrpcStreamContent.cs │ │ ├── GrpcTestContext.cs │ │ ├── GrpcTestFixture.cs │ │ ├── HttpResponseMessageExtensions.cs │ │ ├── InProcessTestServer.cs │ │ ├── ListenerSubscription.cs │ │ ├── LogRecord.cs │ │ ├── LogSinkProvider.cs │ │ ├── LoopbackProxyServer.cs │ │ ├── PushStreamContent.cs │ │ ├── RequireHttp3Attribute.cs │ │ ├── ServerRetryHelper.cs │ │ ├── StreamingContent.cs │ │ ├── TestClient.cs │ │ ├── TestConstants.cs │ │ ├── TestDelegateHandler.cs │ │ ├── TestEventListener.cs │ │ ├── TestServerEndpointName.cs │ │ ├── UnixDomainSocketConnectionFactory.cs │ │ └── VerifyNoErrorsScope.cs │ ├── Linker │ │ ├── Helpers │ │ │ ├── DotNetProcess.cs │ │ │ └── WebsiteProcess.cs │ │ └── LinkerTests.cs │ ├── Server │ │ ├── AuthorizationTests.cs │ │ ├── ClientStreamingMethodTests.cs │ │ ├── CompressionTests.cs │ │ ├── CorsTests.cs │ │ ├── DeadlineTests.cs │ │ ├── DiagnosticsTests.cs │ │ ├── DuplexStreamingMethodTests.cs │ │ ├── HttpContextTests.cs │ │ ├── InterceptorOrderTests.cs │ │ ├── LifetimeTests.cs │ │ ├── MaxMessageSizeTests.cs │ │ ├── NestedTests.cs │ │ ├── ServerStreamingMethodTests.cs │ │ ├── UnaryMethodTests.cs │ │ └── UnimplementedTests.cs │ ├── TestServer │ │ ├── FunctionalTestBase.cs │ │ ├── Helpers │ │ │ ├── ForwardingLoggerProvider.cs │ │ │ ├── GrpcTestContext.cs │ │ │ └── GrpcTestFixture.cs │ │ └── TesterServiceTests.cs │ ├── Web │ │ ├── Client │ │ │ ├── AuthTests.cs │ │ │ ├── ClientFactoryTests.cs │ │ │ ├── ConnectionTests.cs │ │ │ ├── IssueTests.cs │ │ │ ├── ServerStreamingMethodTests.cs │ │ │ ├── TrailerMetadataTests.cs │ │ │ └── UnaryMethodTests.cs │ │ ├── GrpcWebFunctionalTestBase.cs │ │ └── Server │ │ │ ├── DeadlineTests.cs │ │ │ └── UnaryMethodTests.cs │ ├── localhost.pfx │ └── server1.pfx ├── Grpc.AspNetCore.Server.ClientFactory.Tests │ ├── ClientBaseTests.cs │ ├── DefaultGrpcClientFactoryTests.cs │ ├── Grpc.AspNetCore.Server.ClientFactory.Tests.csproj │ ├── Proto │ │ └── greet.proto │ └── TestObjects │ │ └── TestServerCallContextFeature.cs ├── Grpc.AspNetCore.Server.Tests │ ├── BindMethodFinderTests.cs │ ├── CallHandlerTests.cs │ ├── Certs │ │ ├── client.crt │ │ └── outlookcom.crt │ ├── DefaultGrpcInterceptorActivatorTests.cs │ ├── DefaultGrpcServiceActivatorTests.cs │ ├── DuplexStreamingServerCallHandlerTests.cs │ ├── Grpc.AspNetCore.Server.Tests.csproj │ ├── GrpcEndpointRouteBuilderExtensionsTests.cs │ ├── GrpcEventSourceTests.cs │ ├── GrpcProtocolHelpersTests.cs │ ├── GrpcServicesExtensionsTests.cs │ ├── HealthChecks │ │ ├── GrpcHealthChecksPublisherTests.cs │ │ └── HealthServiceTests.cs │ ├── HttpClientFactory │ │ ├── TestGreeterClient.cs │ │ └── TestSecondGreeterClient.cs │ ├── HttpContextServerCallContextTests.cs │ ├── HttpContextStreamReaderTests.cs │ ├── HttpContextStreamWriterTests.cs │ ├── Infrastructure │ │ ├── TestHttpResponseFeature.cs │ │ ├── TestHttpResponseTrailersFeature.cs │ │ ├── TestPipeReader.cs │ │ ├── TestServerStreamWriter.cs │ │ └── TestSystemClock.cs │ ├── InterceptorCollectionTests.cs │ ├── Model │ │ └── BinderServiceMethodProviderTests.cs │ ├── PercentEncodingHelpersTests.cs │ ├── PipeExtensionsByteArrayTests.cs │ ├── PipeExtensionsPipelinesTests.cs │ ├── PipeExtensionsTestsBase.cs │ ├── Proto │ │ ├── echo.proto │ │ └── greet.proto │ ├── Reflection │ │ └── ReflectionGrpcServiceActivatorTests.cs │ ├── ServerCallContextExtensionsTests.cs │ ├── ServerCallDeadlineManagerTests.cs │ ├── ServerCallHandlerFactoryTests.cs │ ├── TestObjects │ │ ├── CustomAttribute.cs │ │ ├── CustomMetadata.cs │ │ ├── Services │ │ │ ├── GreeterServiceWithDuplicateNames.cs │ │ │ ├── GreeterServiceWithMetadataAttributes.cs │ │ │ ├── WithAttribute │ │ │ │ ├── GreeterWithAttribute.cs │ │ │ │ ├── GreeterWithAttributeService.cs │ │ │ │ ├── GreeterWithAttributeServiceSubClass.cs │ │ │ │ └── GreeterWithAttributeServiceSubSubClass.cs │ │ │ └── WithoutAttribute │ │ │ │ ├── GreeterWithoutAttribute.cs │ │ │ │ ├── GreeterWithoutAttributeService.cs │ │ │ │ ├── GreeterWithoutAttributeServiceSubClass.cs │ │ │ │ └── GreeterWithoutAttributeServiceSubSubClass.cs │ │ ├── TestData.cs │ │ ├── TestEndpointRouteBuilder.cs │ │ ├── TestGrpcServiceActivator.cs │ │ └── TestHostApplicationLifetime.cs │ ├── UnaryServerCallHandlerTests.cs │ └── Web │ │ ├── Base64PipeReaderTests.cs │ │ ├── Base64PipeWriterTests.cs │ │ ├── GrpcWebApplicationBuilderExtensionsTests.cs │ │ ├── GrpcWebFeatureTests.cs │ │ ├── GrpcWebMiddlewareTests.cs │ │ ├── GrpcWebProtocolHelpersTests.cs │ │ └── PipeExtensionsBase64Tests.cs ├── Grpc.Core.Api.Tests │ ├── AuthContextTest.cs │ ├── AuthPropertyTest.cs │ ├── CallCredentialsTest.cs │ ├── CallOptionsTest.cs │ ├── ChannelCredentialsTest.cs │ ├── ClientTest.cs │ ├── FakeCredentials.cs │ ├── Grpc.Core.Api.Tests.csproj │ ├── MarshallerTest.cs │ ├── MetadataTest.cs │ ├── RpcExceptionTest.cs │ └── VersionInfoTest.cs ├── Grpc.HealthCheck.Tests │ ├── Grpc.HealthCheck.Tests.csproj │ ├── HealthClientServerTest.cs │ ├── HealthServiceImplTest.cs │ ├── TestResponseStreamWriter.cs │ └── TestServerCallContext.cs ├── Grpc.Net.Client.Tests │ ├── AsyncClientStreamingCallTests.cs │ ├── AsyncDuplexStreamingCallTests.cs │ ├── AsyncServerStreamingCallTests.cs │ ├── AsyncUnaryCallTests.cs │ ├── Balancer │ │ ├── BalancerAttributesTests.cs │ │ ├── ConnectionManagerTests.cs │ │ ├── ConnectivityStateTests.cs │ │ ├── ExponentialBackoffPolicyTests.cs │ │ ├── PickFirstBalancerTests.cs │ │ ├── ResolverTests.cs │ │ ├── RoundRobinBalancerTests.cs │ │ ├── StreamWrapperTests.cs │ │ ├── SubchannelsLoadBalancerTests.cs │ │ └── WaitForReadyTests.cs │ ├── CallCredentialTests.cs │ ├── CancellationTests.cs │ ├── CompressionTests.cs │ ├── ConnectionTests.cs │ ├── DeadlineTests.cs │ ├── DiagnosticsTests.cs │ ├── GetStatusTests.cs │ ├── GetTrailersTests.cs │ ├── Grpc.Net.Client.Tests.csproj │ ├── GrpcCallSerializationContextTests.cs │ ├── GrpcChannelTests.cs │ ├── GrpcProtocolHelpersTests.cs │ ├── HeadersTests.cs │ ├── HttpContentClientStreamReaderTests.cs │ ├── Infrastructure │ │ ├── Balancer │ │ │ ├── TestLoadBalancer.cs │ │ │ ├── TestLoadBalancerFactory.cs │ │ │ ├── TestSubChannelTransport.cs │ │ │ └── TestSubChannelTransportFactory.cs │ │ ├── CallInvokerTestExtensions.cs │ │ ├── ClientLoggerInterceptor.cs │ │ ├── Http2StreamException.cs │ │ ├── HttpClientCallInvokerFactory.cs │ │ ├── NullHttpHandler.cs │ │ ├── QuicStreamAbortedException.cs │ │ ├── StreamSerializationHelper.cs │ │ └── WinHttpHandler.cs │ ├── InterceptorTests.cs │ ├── LoggingTests.cs │ ├── MaximumMessageSizeTests.cs │ ├── OperatingSystemTests.cs │ ├── Proto │ │ └── greet.proto │ ├── ReadAllAsyncTests.cs │ ├── ResponseAsyncTests.cs │ ├── ResponseHeadersAsyncTests.cs │ ├── Retry │ │ ├── ChannelRetryThrottlingTests.cs │ │ ├── HedgingCallTests.cs │ │ ├── HedgingTests.cs │ │ └── RetryTests.cs │ ├── ServiceConfigTests.cs │ ├── SubdirectoryHandlerTests.cs │ ├── ThreadSafeLookupTests.cs │ └── UserAgentGeneratorTests.cs ├── Grpc.Net.Client.Web.Tests │ ├── Base64RequestStreamTests.cs │ ├── Base64ResponseStreamTests.cs │ ├── Grpc.Net.Client.Web.Tests.csproj │ ├── GrpcWebHandlerTests.cs │ ├── GrpcWebRequestContentTests.cs │ ├── GrpcWebResponseContentTests.cs │ └── GrpcWebResponseStreamTests.cs ├── Grpc.Net.ClientFactory.Tests │ ├── DefaultGrpcClientFactoryTests.cs │ ├── Grpc.Net.ClientFactory.Tests.csproj │ ├── GrpcClientServiceExtensionsTests.cs │ ├── GrpcHttpClientBuilderExtensionsTests.cs │ └── Proto │ │ └── greet.proto ├── Grpc.Reflection.Tests │ ├── Grpc.Reflection.Tests.csproj │ ├── ReflectionClientServerTest.cs │ └── SymbolRegistryTest.cs ├── Grpc.StatusProto.Tests │ ├── ExceptionExtensionsTest.cs │ ├── Grpc.StatusProto.Tests.csproj │ ├── MetadataExtensionsTest.cs │ ├── RpcExceptionExtensionsTest.cs │ └── RpcStatusExtensionsTest.cs ├── Shared │ ├── ActivityReplacer.cs │ ├── BalancerWaitHelpers.cs │ ├── CallbackInterceptor.cs │ ├── ClientBaseTests.cs │ ├── ClientTestHelpers.cs │ ├── ExceptionAssert.cs │ ├── HttpContextHelpers.cs │ ├── HttpContextServerCallContextHelpers.cs │ ├── HttpEventSourceListener.cs │ ├── Logging │ │ ├── BeginScopeContext.cs │ │ ├── ITestSink.cs │ │ ├── LogLevelAttribute.cs │ │ ├── TestLogger.cs │ │ ├── TestLoggerFactory.cs │ │ ├── TestLoggerProvider.cs │ │ ├── TestLoggerT.cs │ │ ├── TestSink.cs │ │ └── WriteContext.cs │ ├── MessageHelpers.cs │ ├── NUnitLogger.cs │ ├── ObserverToList.cs │ ├── ResponseUtils.cs │ ├── ServiceConfigHelpers.cs │ ├── ServicesHelpers.cs │ ├── SyncPoint.cs │ ├── SyncPointMemoryStream.cs │ ├── TaskExtensions.cs │ ├── TestHelpers.cs │ ├── TestHttpContextAccessor.cs │ ├── TestHttpMessageHandler.cs │ ├── TestRequestBodyPipeFeature.cs │ ├── TestResolver.cs │ ├── TestResolverFactory.cs │ ├── TestResponseBodyFeature.cs │ └── TestServerCallContext.cs └── dotnet-grpc.Tests │ ├── AddFileCommandTests.cs │ ├── AddUrlCommandTests.cs │ ├── CommandBaseTests.cs │ ├── DirectoryExtensions.cs │ ├── ListCommandTests.cs │ ├── RefreshCommandTests.cs │ ├── RemoveCommandTests.cs │ ├── TestAssets │ ├── DuplicateProjects │ │ ├── client.csproj │ │ └── server.csproj │ ├── EmptyProject │ │ ├── Proto │ │ │ ├── a.proto │ │ │ └── b.proto │ │ └── test.csproj │ ├── MultipleReferences │ │ └── test.csproj │ └── ProjectWithReference │ │ ├── Proto │ │ └── a.proto │ │ └── test.csproj │ ├── TestBase.cs │ └── dotnet-grpc.Tests.csproj └── testassets ├── BenchmarkWorkerWebsite ├── BenchmarkServiceImpl.cs ├── BenchmarkWorkerWebsite.csproj ├── IServerRunner.cs ├── Program.cs ├── README.md ├── ServerRunners.cs ├── Startup.cs ├── TimeStats.cs ├── WorkerServiceImpl.cs └── grpc │ ├── core │ └── grpc_core_stats.proto │ └── testing │ ├── benchmark_service.proto │ ├── control.proto │ ├── messages.proto │ ├── payloads.proto │ ├── stats.proto │ └── worker_service.proto ├── Certs └── InteropTests │ ├── README.md │ ├── ca.pem │ ├── server1.key │ ├── server1.pem │ └── server1.pfx ├── FunctionalTestsWebsite ├── FunctionalTestsWebsite.csproj ├── Infrastructure │ ├── DynamicEndpointDataSource.cs │ ├── DynamicService.cs │ ├── DynamicServiceModelProvider.cs │ ├── IncrementingCounter.cs │ └── ValueProvider.cs ├── Program.cs ├── Services │ ├── AnyService.cs │ ├── AuthorizedGreeter.cs │ ├── ChatterService.cs │ ├── CompressionService.cs │ ├── CounterService.cs │ ├── EchoService.cs │ ├── GreeterService.cs │ ├── IssueService.cs │ ├── LifetimeService.cs │ ├── NestedService.cs │ ├── RacerService.cs │ ├── SecondGreeterService.cs │ ├── SingletonCounterService.cs │ ├── StreamService.cs │ └── TesterService.cs └── Startup.cs ├── InteropTestsClient ├── InteropTestsClient.csproj ├── Program.cs └── RunGrpcTests.ps1 ├── InteropTestsGrpcWebClient ├── App.razor ├── Infrastructure │ ├── InteropTestInvoker.cs │ └── PageLoggerFactory.cs ├── InteropTestsGrpcWebClient.csproj ├── Pages │ ├── Index.razor │ └── Index.razor.cs ├── Program.cs ├── Shared │ └── MainLayout.razor ├── _Imports.razor └── wwwroot │ └── index.html ├── InteropTestsGrpcWebWebsite ├── Dockerfile ├── InteropTestsGrpcWebWebsite.csproj ├── Program.cs ├── Startup.cs └── Tests │ ├── .gitignore │ ├── __tests__ │ └── interoptests.js │ ├── custom-environment.js │ ├── jest-puppeteer.config.js │ ├── jest.config.js │ ├── package-lock.json │ └── package.json ├── InteropTestsNativeServer ├── InteropServer.cs ├── InteropTestsNativeServer.csproj ├── Program.cs ├── README.md ├── TestCredentials.cs └── TestServiceImpl.cs ├── InteropTestsWebsite ├── Dockerfile ├── InteropTestsWebsite.csproj ├── Program.cs ├── README.md ├── Startup.cs └── TestServiceImpl.cs ├── LinkerTestsClient ├── LinkerTestsClient.csproj └── Program.cs ├── LinkerTestsWebsite ├── LinkerTestsWebsite.csproj ├── Program.cs └── Services │ └── GreeterService.cs ├── Proto ├── any.proto ├── authorize.proto ├── chat.proto ├── compression.proto ├── count.proto ├── echo.proto ├── greet.proto ├── grpc │ └── testing │ │ ├── empty.proto │ │ ├── messages.proto │ │ └── test.proto ├── issue.proto ├── lifetime.proto ├── nested.proto ├── race.proto ├── singleton.proto ├── streaming.proto ├── test.proto └── unimplemented.proto ├── README.md └── Shared ├── Assert.cs ├── AsyncStreamExtensions.cs ├── ExceptionAssert.cs ├── IChannelWrapper.cs ├── InteropClient.cs └── TestCredentials.cs /.dockerignore: -------------------------------------------------------------------------------- 1 | **/bin 2 | **/obj 3 | .vs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sh -lf 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ask_question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ask a question 3 | about: Ask a question related to this project 4 | labels: question 5 | 6 | --- 7 | 8 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Issue with Grpc.Core 4 | url: https://github.com/grpc/grpc/issues/new/choose 5 | about: Please open issues relating to Grpc.Core in grpc/grpc. 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Oo]bj/ 2 | [Bb]in/ 3 | TestResults/ 4 | .nuget/ 5 | *.sln.ide/ 6 | _ReSharper.*/ 7 | .idea/ 8 | packages/ 9 | artifacts/ 10 | PublishProfiles/ 11 | .vs/ 12 | *.user 13 | *.suo 14 | *.cache 15 | *.docstates 16 | _ReSharper.* 17 | nuget.exe 18 | *net45.csproj 19 | *net451.csproj 20 | *k10.csproj 21 | *.psess 22 | *.vsp 23 | *.pidb 24 | *.userprefs 25 | *DS_Store 26 | *.ncrunchsolution 27 | *.*sdf 28 | *.ipch 29 | *.swp 30 | *~ 31 | .build/ 32 | .testPublish/ 33 | launchSettings.json 34 | BenchmarkDotNet.Artifacts/ 35 | BDN.Generated/ 36 | binaries/ 37 | .vscode/ 38 | *.binlog 39 | build/feed 40 | .dotnet/ 41 | *.log.txt 42 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | Microsoft Inc. 3 | -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Community Code of Conduct 2 | 3 | gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contributions to grpc-dotnet! Please read the gRPC 4 | organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md) 5 | and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding. 6 | -------------------------------------------------------------------------------- /GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). 2 | -------------------------------------------------------------------------------- /TROUBLESHOOTING.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting gRPC for .NET 2 | 3 | This guide is for troubleshooting gRPC for .NET (grpc-dotnet). For issues specific to Grpc.Core (C-core server and client), or code generation with Grpc.Tools, please refer to [TROUBLESHOOTING.md](https://github.com/grpc/grpc/blob/master/TROUBLESHOOTING.md) in `grpc/grpc` repository. 4 | 5 | ## Troubleshooting documentation 6 | 7 | For solutions for commonly encountered problems, see [gRPC troubleshooting](https://docs.microsoft.com/aspnet/core/grpc/troubleshoot). 8 | 9 | ## Answers on StackOverflow 10 | 11 | Your problem might have already been solved on StackOverflow. Search for questions with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc 12 | 13 | ## Enabling extra logging and tracing 14 | 15 | Extra logging can be very useful for diagnosing problems. For documentation on configuring logging in gRPC services and clients, see 16 | [Logging and diagnostics in gRPC on .NET](https://docs.microsoft.com/aspnet/core/grpc/diagnostics). 17 | -------------------------------------------------------------------------------- /build/version.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 2.66.0-dev 6 | 7 | 8 | 2.0.0.0 9 | 10 | 11 | 2.66.0.0 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /doc/images/packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/doc/images/packages.png -------------------------------------------------------------------------------- /docfx/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | obj 3 | -------------------------------------------------------------------------------- /docfx/README.md: -------------------------------------------------------------------------------- 1 | DocFX-generated C# API Reference 2 | -------------------------------- 3 | 4 | ## Generating docs manually (on Windows) 5 | 6 | Install docfx based on instructions here: https://github.com/dotnet/docfx 7 | 8 | ``` 9 | # generate docfx documentation into ./html directory 10 | $ docfx 11 | 12 | # view the resulting docs 13 | $ docfx server html 14 | ``` 15 | 16 | ## Release process: script for regenerating the docs automatically 17 | 18 | After each gRPC C# release, the docs need to be regenerated 19 | and updated on the grpc.io site. The automated script will 20 | re-generate the docs (using dockerized docfx installation) 21 | and make everything ready for creating a PR to update the docs. 22 | 23 | ``` 24 | # 1. Run the script on Linux with docker installed 25 | $ ./generate_reference_docs.sh 26 | 27 | # 2. Enter the git repo with updated "gh-pages" branch 28 | $ cd grpc-gh-pages 29 | 30 | # 3. Review the changes and create a pull request 31 | ``` 32 | -------------------------------------------------------------------------------- /docfx/toc.yml: -------------------------------------------------------------------------------- 1 | - name: API Documentation 2 | href: obj/api/ 3 | homepage: obj/api/Grpc.Core.yml 4 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | grpcweb-server: 3 | build: 4 | context: ./ 5 | dockerfile: ./testassets/InteropTestsWebsite/Dockerfile 6 | image: grpc-dotnet/grpcweb-server 7 | ports: 8 | - "8080:80" 9 | grpcweb-client: 10 | build: 11 | context: ./ 12 | dockerfile: ./testassets/InteropTestsGrpcWebWebsite/Dockerfile 13 | image: grpc-dotnet/grpcweb-client 14 | ports: 15 | - "8081:80" 16 | -------------------------------------------------------------------------------- /examples/Aggregator/Aggregator.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Aggregator/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/Aggregator/Proto/aggregate.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | import "count.proto"; 18 | import "greet.proto"; 19 | 20 | package aggregate; 21 | 22 | service Aggregator { 23 | rpc AccumulateCount (stream count.CounterRequest) returns (count.CounterReply); 24 | rpc SayHellos (greet.HelloRequest) returns (stream greet.HelloReply); 25 | } -------------------------------------------------------------------------------- /examples/Aggregator/Server/IncrementingCounter.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Server 20 | { 21 | public class IncrementingCounter 22 | { 23 | public void Increment(int amount) 24 | { 25 | Count += amount; 26 | } 27 | 28 | public int Count { get; private set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/Aggregator/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Aggregator/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Aggregator/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Aggregator/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Blazor/Blazor.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Blazor/Client/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /examples/Blazor/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/Blazor/Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/Blazor/Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /examples/Blazor/Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string? Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /examples/Blazor/Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Threading 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.JSInterop 7 | @using Client 8 | @using Client.Shared 9 | @using Count 10 | @using Grpc.Net.Client 11 | @using Weather 12 | -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | // Explicit backend URL (override current site) 3 | "BackendUrl": null 4 | } 5 | -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Blazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/grpc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Blazor/Client/wwwroot/grpc-logo.png -------------------------------------------------------------------------------- /examples/Blazor/Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | gRPC-Web in Blazor 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Loading...
15 | 16 |
17 | An unhandled error has occurred. 18 | Reload 19 | 🗙 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/Blazor/Proto/count.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package count; 18 | 19 | service Counter { 20 | rpc StartCounter (CounterRequest) returns (stream CounterResponse); 21 | } 22 | 23 | message CounterRequest { 24 | int32 start = 1; 25 | } 26 | 27 | message CounterResponse { 28 | int32 count = 1; 29 | } 30 | -------------------------------------------------------------------------------- /examples/Blazor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:59193/", 7 | "sslPort": 44375 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "Server": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /examples/Blazor/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 46982f83-f153-443e-b589-4b2bc7b5945e 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Blazor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Blazor/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /examples/Browser/Browser.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/Browser/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Browser/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /examples/Browser/Server/wwwroot/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /examples/Browser/Server/wwwroot/Scripts/README.md: -------------------------------------------------------------------------------- 1 | # gRPC-Web generated client 2 | 3 | gRPC-Web JavaScript clients and messages are generated using `protoc` the gRPC-Web code generator plugin. Instructions for using it are available [here](https://github.com/grpc/grpc-web#code-generator-plugin). 4 | 5 | Files in this directory are generated from *greet.proto*: 6 | 7 | * *greet_grpc_web_pb.js* contains the gRPC-Web client. 8 | * *greet_pb.js* contains gRPC messages. 9 | 10 | Example of using `protoc` from PowerShell (`protoc` and `protoc-gen-grpc-web` should be on your computer and discoverable from your PATH): 11 | 12 | > protoc greet.proto --js_out=import_style=commonjs:CHANGE_TO_SCRIPTS_DIRECTORY --grpc-web_out=import_style=commonjs,mode=grpcwebtext:CHANGE_TO_SCRIPTS_DIRECTORY --plugin=protoc-gen-grpc-web=CHANGE_TO_PROTOC_GEN_GRPC_WEB_EXE_PATH 13 | -------------------------------------------------------------------------------- /examples/Browser/Server/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Browser/Server/wwwroot/favicon.ico -------------------------------------------------------------------------------- /examples/Browser/Server/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | gRPC-Web ASP.NET Core example 6 | 7 | 8 |

gRPC-Web ASP.NET Core example

9 |
10 | Hello: 11 | 12 | 13 | 14 |
15 |
16 |

17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/Browser/Server/wwwroot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "name": "browser-server", 4 | "private": true, 5 | "devDependencies": { 6 | "@grpc/proto-loader": "^0.3.0", 7 | "google-protobuf": "^3.6.1", 8 | "grpc-web": "^1.0.0", 9 | "webpack": "^5.94.0", 10 | "webpack-cli": "^5.0.1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Certifier/Certifier.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Certifier/Client/Certs/client.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Certifier/Client/Certs/client.pfx -------------------------------------------------------------------------------- /examples/Certifier/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | PreserveNewest 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/Certifier/Proto/certify.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | import "google/protobuf/empty.proto"; 18 | 19 | package certify; 20 | 21 | service Certifier { 22 | rpc GetCertificateInfo (google.protobuf.Empty) returns (CertificateInfoResponse); 23 | } 24 | 25 | message CertificateInfoResponse { 26 | bool hasCertificate = 1; 27 | string name = 2; 28 | } 29 | -------------------------------------------------------------------------------- /examples/Certifier/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Certifier/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Certifier/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Certifier/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Channeler/Channeler.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Channeler/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Channeler/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Channeler/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Channeler/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Channeler/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Channeler/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Coder/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Coder/Coder.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/Coder/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using ProtoBuf.Grpc.Server; 20 | using Server; 21 | 22 | var builder = WebApplication.CreateBuilder(args); 23 | builder.Services.AddGrpc(); 24 | builder.Services.AddCodeFirstGrpc(); 25 | 26 | var app = builder.Build(); 27 | app.MapGrpcService(); 28 | 29 | app.Run(); -------------------------------------------------------------------------------- /examples/Coder/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Coder/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Coder/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Coder/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Coder/Shared/HelloReply.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using System.Runtime.Serialization; 20 | 21 | namespace Shared 22 | { 23 | [DataContract] 24 | public class HelloReply 25 | { 26 | [DataMember(Order = 1)] 27 | public string? Message { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/Coder/Shared/HelloRequest.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using System.Runtime.Serialization; 20 | 21 | namespace Shared 22 | { 23 | [DataContract] 24 | public class HelloRequest 25 | { 26 | [DataMember(Order = 1)] 27 | public string? Name { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/Coder/Shared/Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Compressor/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Compressor/Compressor.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Compressor/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(o => 23 | { 24 | o.ResponseCompressionAlgorithm = "gzip"; 25 | }); 26 | 27 | var app = builder.Build(); 28 | app.MapGrpcService(); 29 | 30 | app.Run(); 31 | -------------------------------------------------------------------------------- /examples/Compressor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Compressor/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Compressor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Compressor/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Container/Backend/Backend.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Container/Backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env 2 | WORKDIR /app 3 | 4 | # Copy everything 5 | COPY . ./ 6 | RUN dotnet --info 7 | RUN dotnet restore examples/Container/Backend 8 | RUN dotnet publish examples/Container/Backend -c Release -o out 9 | 10 | # Build runtime image 11 | FROM mcr.microsoft.com/dotnet/aspnet:9.0 12 | WORKDIR /app 13 | COPY --from=build-env /app/out . 14 | ENTRYPOINT ["dotnet", "Backend.dll"] -------------------------------------------------------------------------------- /examples/Container/Backend/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server.Services; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Logging.SetMinimumLevel(LogLevel.Trace); 23 | builder.Services.AddGrpc(); 24 | 25 | var app = builder.Build(); 26 | app.MapGrpcService(); 27 | 28 | app.Run(); 29 | -------------------------------------------------------------------------------- /examples/Container/Backend/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Container/Backend/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Trace" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Container/Container.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Container/Frontend/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /examples/Container/Frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env 2 | WORKDIR /app 3 | 4 | # Copy everything 5 | COPY . ./ 6 | RUN dotnet --info 7 | RUN dotnet restore examples/Container/Frontend 8 | RUN dotnet publish examples/Container/Frontend -c Release -o out 9 | 10 | # Build runtime image 11 | FROM mcr.microsoft.com/dotnet/aspnet:9.0 12 | WORKDIR /app 13 | COPY --from=build-env /app/out . 14 | ENTRYPOINT ["dotnet", "Frontend.dll"] -------------------------------------------------------------------------------- /examples/Container/Frontend/Frontend.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | 6 | 7 | $(NoWarn);CS0618 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/Container/Frontend/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace Frontend.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | [IgnoreAntiforgeryToken] 14 | public class ErrorModel : PageModel 15 | { 16 | public string? RequestId { get; set; } 17 | 18 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 19 | 20 | private readonly ILogger _logger; 21 | 22 | public ErrorModel(ILogger logger) 23 | { 24 | _logger = logger; 25 | } 26 | 27 | public void OnGet() 28 | { 29 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/Container/Frontend/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/Container/Frontend/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /examples/Container/Frontend/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string? Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /examples/Container/Frontend/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Threading 3 | @using Microsoft.AspNetCore.Authorization 4 | @using Microsoft.AspNetCore.Components.Authorization 5 | @using Microsoft.AspNetCore.Components.Forms 6 | @using Microsoft.AspNetCore.Components.Routing 7 | @using Microsoft.AspNetCore.Components.Web 8 | @using Microsoft.AspNetCore.Components.Web.Virtualization 9 | @using Microsoft.JSInterop 10 | @using Frontend 11 | @using Frontend.Balancer 12 | @using Frontend.Shared 13 | @using Grpc.Core 14 | @using Grpc.Net.Client 15 | @using Grpc.Net.Client.Balancer 16 | @using Weather 17 | -------------------------------------------------------------------------------- /examples/Container/Frontend/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Trace", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Container/Frontend/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Trace", 5 | "Microsoft": "Information" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "BackendUrl": "https://localhost:5101" 10 | } 11 | -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/favicon.ico -------------------------------------------------------------------------------- /examples/Container/Frontend/wwwroot/grpc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Container/Frontend/wwwroot/grpc-logo.png -------------------------------------------------------------------------------- /examples/Container/deploy.ps1: -------------------------------------------------------------------------------- 1 | docker compose -f .\docker-compose.yml build container-frontend 2 | docker compose -f .\docker-compose.yml build container-backend 3 | 4 | kubectl delete -f .\Kubernetes\deploy-backend.yml 5 | kubectl apply -f .\Kubernetes\deploy-backend.yml 6 | 7 | kubectl delete -f .\Kubernetes\deploy-frontend.yml 8 | kubectl apply -f .\Kubernetes\deploy-frontend.yml 9 | -------------------------------------------------------------------------------- /examples/Container/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | container-frontend: 3 | build: 4 | context: ./../../ 5 | dockerfile: ./examples/Container/Frontend/Dockerfile 6 | image: grpc-dotnet/container-frontend 7 | ports: 8 | - "8080:80" 9 | container-backend: 10 | build: 11 | context: ./../../ 12 | dockerfile: ./examples/Container/Backend/Dockerfile 13 | image: grpc-dotnet/container-backend 14 | ports: 15 | - "8081:80" 16 | -------------------------------------------------------------------------------- /examples/Counter/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Counter/Counter.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Counter/Server/IncrementingCounter.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Server 20 | { 21 | public class IncrementingCounter 22 | { 23 | public void Increment(int amount) 24 | { 25 | Count += amount; 26 | } 27 | 28 | public int Count { get; private set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/Counter/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | builder.Services.AddSingleton(); 24 | 25 | var app = builder.Build(); 26 | app.MapGrpcService(); 27 | 28 | app.Run(); 29 | -------------------------------------------------------------------------------- /examples/Counter/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Counter/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Counter/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Counter/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Downloader/Client/Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Downloader/Downloader.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Downloader/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Downloader/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Downloader/Server/Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Downloader/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Downloader/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Downloader/Server/pancakes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Downloader/Server/pancakes.jpg -------------------------------------------------------------------------------- /examples/Downloader/Server/pancakes4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Downloader/Server/pancakes4.png -------------------------------------------------------------------------------- /examples/Error/Client/Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Error/Error.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Error/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Error/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Error/Server/Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Error/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Error/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Frameworker/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net4.7.2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/Frameworker/Frameworker.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Frameworker/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Frameworker/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Frameworker/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Frameworker/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Frameworker/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Greeter/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Greeter/Greeter.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Greeter/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Greeter/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Greeter/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Greeter/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Greeter/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Interceptor/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/Interceptor/Interceptor.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Interceptor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Interceptor/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Interceptor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Interceptor/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Liber/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/Liber/Common/Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Liber/Liber.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/Liber/Proto/common.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package common; 18 | 19 | message Name { 20 | string firstName = 1; 21 | string middleName = 2; 22 | string lastName = 3; 23 | } 24 | -------------------------------------------------------------------------------- /examples/Liber/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Liber/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Liber/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Liber/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Liber/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Locator/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Locator/Locator.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Locator/Proto/external.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package greet; 18 | 19 | service External { 20 | rpc SayHello (ExternalRequest) returns (ExternalReply); 21 | } 22 | 23 | message ExternalRequest { 24 | string name = 1; 25 | } 26 | 27 | message ExternalReply { 28 | string message = 1; 29 | } 30 | -------------------------------------------------------------------------------- /examples/Locator/Proto/internal.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package greet; 18 | 19 | service Internal { 20 | rpc SayHello (InternalRequest) returns (InternalReply); 21 | } 22 | 23 | message InternalRequest { 24 | string name = 1; 25 | } 26 | 27 | message InternalReply { 28 | string message = 1; 29 | } 30 | -------------------------------------------------------------------------------- /examples/Locator/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Locator/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Locator/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Mailer/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Mailer/Mailer.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Mailer/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | builder.Services.AddSingleton(); 24 | 25 | var app = builder.Build(); 26 | app.MapGrpcService(); 27 | 28 | app.Run(); 29 | -------------------------------------------------------------------------------- /examples/Mailer/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Mailer/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Mailer/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Mailer/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Progressor/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Progressor/Progressor.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Progressor/Server/Monarchs-of-England.txt: -------------------------------------------------------------------------------- 1 | Offa Egbert Aethelwulf Aethelbald Aethelbert Aethelred I Alfred the Great Edward the Elder Athelstan Edmund Edred Edwy Edgar Edward the Martyr Ethelred II the Unready Edmund lronside Cnut (Canute) Harold I Harefoot Harthacanut Edward the Confessor Harold II William I William II Henry I Stephen Henry II Richard I John Henry III Edward I Edward II Edward III Richard II Henry IV Henry V Henry VI Edward IV Edward V Richard III Henry VII Henry VIII Edward VI Mary I Elizabeth I James I Charles I Commonwealth Oliver Cromwell Richard Cromwell Charles II James II William III of Orange and Mary II (jointly) William III (alone) Anne George I George II George III George IV William IV Victoria Edward VII George V Edward VIII George VI Elizabeth II 2 | -------------------------------------------------------------------------------- /examples/Progressor/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Progressor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Progressor/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/Progressor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Progressor/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Racer/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Racer/Proto/race.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package race; 18 | 19 | service Racer { 20 | rpc ReadySetGo (stream RaceMessage) returns (stream RaceMessage); 21 | } 22 | 23 | message RaceMessage { 24 | int32 count = 1; 25 | } 26 | -------------------------------------------------------------------------------- /examples/Racer/Racer.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Racer/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Racer/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Racer/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Racer/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Racer/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Reflector/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Reflector/Reflector.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Reflector/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | builder.Services.AddGrpcReflection(); 24 | 25 | var app = builder.Build(); 26 | app.MapGrpcService(); 27 | app.MapGrpcReflectionService(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /examples/Reflector/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Reflector/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Reflector/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Reflector/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Retrier/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Retrier/Proto/retry.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package retry; 18 | 19 | service Retrier { 20 | rpc DeliverPackage (Package) returns (Response); 21 | } 22 | 23 | message Package { 24 | string name = 1; 25 | } 26 | 27 | message Response { 28 | string message = 1; 29 | } 30 | -------------------------------------------------------------------------------- /examples/Retrier/Retrier.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Retrier/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Retrier/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Retrier/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Retrier/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Retrier/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/README.md: -------------------------------------------------------------------------------- 1 | # gRPC-Web generated client 2 | 3 | gRPC-Web JavaScript clients and messages are generated using `protoc` the gRPC-Web code generator plugin. Instructions for using it are available [here](https://github.com/grpc/grpc-web#code-generator-plugin). 4 | 5 | Files in this directory are generated from *greet.proto*: 6 | 7 | * *greet_grpc_web_pb.js* contains the gRPC-Web client. 8 | * *greet_pb.js* contains gRPC messages. 9 | 10 | Example of using `protoc` from PowerShell (`protoc` and `protoc-gen-grpc-web` should be on your computer and discoverable from your PATH): 11 | 12 | > protoc greet.proto --js_out=import_style=commonjs:CHANGE_TO_SCRIPTS_DIRECTORY --grpc-web_out=import_style=commonjs,mode=grpcwebtext:CHANGE_TO_SCRIPTS_DIRECTORY --plugin=protoc-gen-grpc-web=CHANGE_TO_PROTOC_GEN_GRPC_WEB_EXE_PATH 13 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spar-server", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "parcel src/index.html --open", 7 | "build:watch": "parcel watch src/index.html", 8 | "build:prod": "npx rimraf dist && parcel build src/index.html", 9 | "protogen": "protoc -I ./../../Proto/ ./../../Proto/greet.proto --js_out=import_style=commonjs:./src/generated/ --grpc-web_out=import_style=typescript,mode=grpcwebtext:./src/generated/" 10 | }, 11 | "dependencies": { 12 | "google-protobuf": "^3.19.4", 13 | "grpc-web": "^1.3.1", 14 | "vue": "^3.0.0", 15 | "vue-class-component": "^7.2.6", 16 | "vue-hot-reload-api": "^2.3.4", 17 | "vue-property-decorator": "^9.1.2" 18 | }, 19 | "devDependencies": { 20 | "@vue/component-compiler-utils": "^3.3.0", 21 | "parcel-bundler": "^1.12.4", 22 | "rimraf": "^3.0.2", 23 | "typescript": "^4.5.5", 24 | "vue-template-compiler": "^2.6.14" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/src/custom.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.vue" { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | gRPC-Web ASP.NET Core example 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/src/index.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | 4 | new Vue({ 5 | render: h => h(App), 6 | }).$mount('#app'); 7 | -------------------------------------------------------------------------------- /examples/Spar/Server/ClientApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist/", 4 | "sourceMap": true, 5 | "strict": true, 6 | "noImplicitReturns": false, 7 | "noImplicitAny": false, 8 | "module": "esnext", 9 | "moduleResolution": "node", 10 | "target": "es5", 11 | "allowJs": true, 12 | "resolveJsonModule": true, 13 | }, 14 | "lib": ["dom", "esnext"], 15 | "include": ["./src/**/*"] 16 | } 17 | -------------------------------------------------------------------------------- /examples/Spar/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "http://localhost:5000;https://localhost:5001" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /examples/Spar/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Spar/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /examples/Spar/Server/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Spar/Server/wwwroot/favicon.ico -------------------------------------------------------------------------------- /examples/Spar/Spar.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/Tester/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | dotnet-Client-33BD397C-6A11-40D0-AF85-24B9610F7517 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Tester/Client/IGreetRepository.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Client 20 | { 21 | public interface IGreetRepository 22 | { 23 | void SaveGreeting(string message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/Tester/Client/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/Tester/Client/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Grpc": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Tester/Common/Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Tester/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var host = Host.CreateDefaultBuilder(args) 22 | .ConfigureWebHostDefaults(webBuilder => 23 | { 24 | webBuilder.UseStartup(); 25 | }).Build(); 26 | 27 | host.Run(); 28 | -------------------------------------------------------------------------------- /examples/Tester/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Tester/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Tester/Server/Services/IGreeter.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | 20 | namespace Server 21 | { 22 | public interface IGreeter 23 | { 24 | string Greet(string name); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/Tester/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Tester/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Tester/Tester.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/Tester/Tests/Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/Ticketer/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Ticketer/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Ticketer/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Ticketer/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Ticketer/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Ticketer/Ticketer.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Transcoder/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | true 6 | $(NoWarn);1591 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/Transcoder/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Transcoder/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /examples/Transcoder/Server/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Transcoder/Server/wwwroot/favicon.ico -------------------------------------------------------------------------------- /examples/Transcoder/Server/wwwroot/images/grpc-rest-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Transcoder/Server/wwwroot/images/grpc-rest-logo.png -------------------------------------------------------------------------------- /examples/Transcoder/Transcoder.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/Transporter/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Transporter/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Transporter/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Transporter/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Transporter/Transporter.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Uploader/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Uploader/Client/pancakes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/examples/Uploader/Client/pancakes.jpg -------------------------------------------------------------------------------- /examples/Uploader/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | 24 | var app = builder.Build(); 25 | app.MapGrpcService(); 26 | 27 | app.Run(); 28 | -------------------------------------------------------------------------------- /examples/Uploader/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Uploader/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/Uploader/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Uploader/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | }, 13 | "StoredFilesPath": "./uploads" 14 | } 15 | -------------------------------------------------------------------------------- /examples/Uploader/Uploader.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Vigor/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/Vigor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Vigor/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Vigor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Vigor/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Vigor/Vigor.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/Worker/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | dotnet-Client-33BD397C-6A11-40D0-AF85-24B9610F7517 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/Worker/Client/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/Worker/Client/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Grpc": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Worker/Server/IncrementingCounter.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Server 20 | { 21 | public class IncrementingCounter 22 | { 23 | public void Increment(int amount) 24 | { 25 | Count += amount; 26 | } 27 | 28 | public int Count { get; private set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/Worker/Server/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Server; 20 | 21 | var builder = WebApplication.CreateBuilder(args); 22 | builder.Services.AddGrpc(); 23 | builder.Services.AddSingleton(); 24 | 25 | var app = builder.Build(); 26 | app.MapGrpcService(); 27 | 28 | app.Run(); 29 | -------------------------------------------------------------------------------- /examples/Worker/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "launchBrowser": false, 6 | "applicationUrl": "https://localhost:5001", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/Worker/Server/Server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /examples/Worker/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/Worker/Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "Kestrel": { 9 | "EndpointDefaults": { 10 | "Protocols": "Http2" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/Worker/Worker.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "9.0.300", 4 | "rollForward": "latestFeature" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /keys/Grpc.public.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/keys/Grpc.public.snk -------------------------------------------------------------------------------- /keys/Grpc.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/keys/Grpc.snk -------------------------------------------------------------------------------- /keys/README.md: -------------------------------------------------------------------------------- 1 | Contents 2 | -------- 3 | 4 | - Grpc.public.snk: 5 | Public key to verify strong name of gRPC assemblies. 6 | - Grpc.snk: 7 | Signing key to provide strong name of gRPC assemblies. 8 | As per https://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.110).aspx 9 | signing key should be checked into the repository. 10 | 11 | These keys originated from https://github.com/grpc/grpc/tree/master/src/csharp/keys. 12 | -------------------------------------------------------------------------------- /kokoro/README.md: -------------------------------------------------------------------------------- 1 | Configuration files and helper scripts for Google-internal CI tool called "Kokoro". -------------------------------------------------------------------------------- /kokoro/build_nuget.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The gRPC Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for the internal CI (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-dotnet/kokoro/build_nuget.sh" 19 | timeout_mins: 30 20 | 21 | action { 22 | define_artifacts { 23 | regex: "**/*sponge_log.*" 24 | regex: "github/grpc-dotnet/artifacts/**" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kokoro/interop.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The gRPC Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for the internal CI (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-dotnet/kokoro/interop.sh" 19 | timeout_mins: 30 20 | 21 | action { 22 | define_artifacts { 23 | regex: "**/*sponge_log.*" 24 | regex: "github/grpc-dotnet/artifacts/**" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kokoro/linux.cfg: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The gRPC Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Config file for the internal CI (in protobuf text format) 16 | 17 | # Location of the continuous shell script in repository. 18 | build_file: "grpc-dotnet/kokoro/build_nuget.sh" 19 | timeout_mins: 30 20 | 21 | action { 22 | define_artifacts { 23 | regex: "**/*sponge_log.*" 24 | regex: "github/grpc-dotnet/artifacts/**" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packageIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/packageIcon.png -------------------------------------------------------------------------------- /perf/Grpc.AspNetCore.Microbenchmarks/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | using Grpc.AspNetCore.Microbenchmarks; 20 | 21 | [assembly: DefaultCoreConfigAttribute] -------------------------------------------------------------------------------- /perf/Grpc.AspNetCore.Microbenchmarks/Proto/chat.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package chat; 18 | 19 | // The greeting service definition. 20 | service Chatter { 21 | // Sends a greeting 22 | rpc Chat (stream ChatMessage) returns (stream ChatMessage); 23 | } 24 | 25 | // The chat message. 26 | message ChatMessage { 27 | string name = 1; 28 | string message = 2; 29 | } 30 | -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcAspNetCoreServer/RunGrpcServer.ps1: -------------------------------------------------------------------------------- 1 | Param 2 | ( 3 | [string]$protocol = "h2c", 4 | [string]$log_level = "None", 5 | [bool]$enable_cert_auth = $false, 6 | [bool]$publish_aot = $false 7 | ) 8 | 9 | # Command line example: 10 | # .\RunGrpcServer.ps1 -publish_aot $true 11 | 12 | Write-Host "Protocol: $protocol" -ForegroundColor Cyan 13 | Write-Host "Log level: $log_level" -ForegroundColor Cyan 14 | Write-Host "Enable cert auth: $enable_cert_auth" -ForegroundColor Cyan 15 | Write-Host "Publish AOT: $publish_aot" -ForegroundColor Cyan 16 | Write-Host 17 | 18 | dotnet publish -r win-x64 -c Release --self-contained --output bin\Publish -p:PublishAot=$publish_aot 19 | if ($LASTEXITCODE -ne 0) 20 | { 21 | exit; 22 | } 23 | 24 | .\bin\Publish\GrpcAspNetCoreServer.exe --protocol $protocol --logLevel $log_level --enableCertAuth $enable_cert_auth 25 | Write-Host 26 | 27 | Write-Host "Done" -ForegroundColor Cyan -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcAspNetCoreServer/grpc-aspnetcore-server.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | grpcAspNetCoreServer: 3 | source: 4 | repository: https://github.com/grpc/grpc-dotnet.git 5 | branchOrCommit: master 6 | project: perf/benchmarkapps/GrpcAspNetCoreServer/GrpcAspNetCoreServer.csproj 7 | readyStateText: Application started 8 | waitForExit: false 9 | variables: 10 | protocol: h2c 11 | enableCertAuth: false 12 | logLevel: None 13 | arguments: "--LogLevel {{logLevel}} --enableCertAuth {{enableCertAuth}} --protocol {{protocol}}" -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcAspNetCoreServer/hosting.json: -------------------------------------------------------------------------------- 1 | { 2 | "urls": "", 3 | "server.urls": "", 4 | "protocol": "h2c", // This will be overriden when benchmarks are run 5 | "certificateAuth": false, 6 | "LogLevel": "" 7 | } 8 | -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcClient/Certs/README.md: -------------------------------------------------------------------------------- 1 | These certs are generated via openssl according to https://stackoverflow.com/questions/37714558/how-to-enable-server-side-ssl-for-grpc. The server.crt and server.key were combined into server.pfx. The password is 1111. These certs are not secure, do not use in production. -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcClient/GrpcClientType.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace GrpcClient; 20 | 21 | public enum GrpcClientType 22 | { 23 | GrpcCore, 24 | GrpcNetClient 25 | } -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcCoreServer/grpc-core-server.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | grpcCoreServer: 3 | source: 4 | repository: https://github.com/grpc/grpc-dotnet.git 5 | branchOrCommit: master 6 | project: perf/benchmarkapps/GrpcCoreServer/GrpcCoreServer.csproj 7 | readyStateText: Application started 8 | waitForExit: false 9 | variables: 10 | serverScheme: http 11 | arguments: --server.urls {{serverScheme}}://{{serverAddress}}:{{serverPort}} 12 | -------------------------------------------------------------------------------- /perf/benchmarkapps/GrpcCoreServer/hosting.json: -------------------------------------------------------------------------------- 1 | { 2 | "urls": "", 3 | "server.urls": "", 4 | "protocol": "h2c" 5 | } 6 | -------------------------------------------------------------------------------- /perf/benchmarkapps/QpsWorker/Protos/README.md: -------------------------------------------------------------------------------- 1 | Protobuf contracts used by the QpsWorker. 2 | 3 | Files are copied from https://github.com/grpc/grpc/tree/master/src/proto/grpc 4 | -------------------------------------------------------------------------------- /perf/benchmarkapps/QpsWorker/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "Microsoft.AspNetCore": "Debug" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /perf/benchmarkapps/QpsWorker/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "Microsoft.AspNetCore": "Debug" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "Kestrel": { 10 | "EndpointDefaults": { 11 | "Protocols": "Http2" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /perf/benchmarkapps/Shared/Certs/README.md: -------------------------------------------------------------------------------- 1 | Keys taken from https://github.com/grpc/grpc/tree/master/src/core/tsi/test_creds 2 | so that interop server in this project is compatible with interop clients 3 | implemented in other gRPC languages. 4 | 5 | The server1.pem and server1.key were combined into server1.pfx. The password is 1111. These certs are not secure, do not use in production. 6 | ``` 7 | openssl pkcs12 -export -out server1.pfx -inkey server1.key -in server1.pem -certfile ca.pem 8 | ``` 9 | -------------------------------------------------------------------------------- /perf/benchmarkapps/Shared/Certs/client.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/perf/benchmarkapps/Shared/Certs/client.pfx -------------------------------------------------------------------------------- /perf/benchmarkapps/Shared/Certs/server1.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/perf/benchmarkapps/Shared/Certs/server1.pfx -------------------------------------------------------------------------------- /src/Grpc.AspNetCore.HealthChecks/README.md: -------------------------------------------------------------------------------- 1 | Grpc.AspNetCore.HealthChecks provides integration between [Health checks in ASP.NET Core](https://docs.microsoft.com/aspnet/core/host-and-deploy/health-checks) and the [Grpc.HealthCheck package](https://www.nuget.org/packages/Grpc.HealthCheck). -------------------------------------------------------------------------------- /src/Grpc.AspNetCore.Server/Internal/ISystemClock.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | 20 | namespace Grpc.AspNetCore.Server.Internal; 21 | 22 | internal interface ISystemClock 23 | { 24 | DateTime UtcNow { get; } 25 | } 26 | -------------------------------------------------------------------------------- /src/Grpc.AspNetCore.Server/Internal/SystemClock.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Internal; 20 | 21 | internal sealed class SystemClock : ISystemClock 22 | { 23 | public static readonly SystemClock Instance = new SystemClock(); 24 | 25 | public DateTime UtcNow => DateTime.UtcNow; 26 | } 27 | -------------------------------------------------------------------------------- /src/Grpc.AspNetCore/lib/net6.0/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/src/Grpc.AspNetCore/lib/net6.0/_._ -------------------------------------------------------------------------------- /src/Grpc.AspNetCore/lib/net7.0/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/src/Grpc.AspNetCore/lib/net7.0/_._ -------------------------------------------------------------------------------- /src/Grpc.AspNetCore/lib/net8.0/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/src/Grpc.AspNetCore/lib/net8.0/_._ -------------------------------------------------------------------------------- /src/Grpc.AspNetCore/lib/net9.0/_._: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/src/Grpc.AspNetCore/lib/net9.0/_._ -------------------------------------------------------------------------------- /src/Grpc.Auth/Grpc.Auth.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | gRPC C# Authentication Library 4 | gRPC RPC HTTP/2 Auth OAuth2 5 | 6 | true 7 | true 8 | net462;netstandard2.0 9 | README.md 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/Grpc.Auth/README.md: -------------------------------------------------------------------------------- 1 | # Grpc.Auth 2 | 3 | `Grpc.Auth` is the gRPC C#/.NET authentication library based on `Google.Apis.Auth` -------------------------------------------------------------------------------- /src/Grpc.Core.Api/README.md: -------------------------------------------------------------------------------- 1 | # Grpc.Core.Api 2 | 3 | `Grpc.Core.Api` is the shared API package for gRPC C# and gRPC for .NET implementations of gRPC. 4 | -------------------------------------------------------------------------------- /src/Grpc.HealthCheck/README.md: -------------------------------------------------------------------------------- 1 | # Grpc.HealthCheck 2 | 3 | `Grpc.HealthCheck` contains the reference implementation of gRPC health check service. 4 | -------------------------------------------------------------------------------- /src/Grpc.Net.Client/Internal/Configuration/IConfigValue.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Net.Client.Internal.Configuration; 20 | 21 | internal interface IConfigValue 22 | { 23 | object Inner { get; } 24 | } 25 | -------------------------------------------------------------------------------- /src/Grpc.Net.Client/Internal/IDebugger.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Net.Client.Internal; 20 | 21 | internal interface IDebugger 22 | { 23 | bool IsAttached { get; } 24 | } 25 | -------------------------------------------------------------------------------- /src/Grpc.Net.Client/Internal/ISystemClock.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Net.Client.Internal; 20 | 21 | internal interface ISystemClock 22 | { 23 | DateTime UtcNow { get; } 24 | } 25 | -------------------------------------------------------------------------------- /src/Grpc.Net.Client/Internal/SystemClock.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Net.Client.Internal; 20 | 21 | internal sealed class SystemClock : ISystemClock 22 | { 23 | public static readonly SystemClock Instance = new SystemClock(); 24 | 25 | public DateTime UtcNow => DateTime.UtcNow; 26 | } 27 | -------------------------------------------------------------------------------- /src/Grpc.Net.ClientFactory/Internal/GrpcClientMappingRegistry.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Net.ClientFactory.Internal; 20 | 21 | internal class GrpcClientMappingRegistry 22 | { 23 | public Dictionary NamedClientRegistrations { get; } = new Dictionary(); 24 | } 25 | -------------------------------------------------------------------------------- /src/Grpc.Reflection/README.md: -------------------------------------------------------------------------------- 1 | # Grpc.Reflection 2 | 3 | `Grpc.Reflection` contains the reference implementation of gRPC reflection service. 4 | -------------------------------------------------------------------------------- /src/Shared/IsExternalInit.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace System.Runtime.CompilerServices; 20 | 21 | #if NETCOREAPP3_0 || NETSTANDARD2_0_OR_GREATER || NET462 22 | internal static class IsExternalInit 23 | { 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /src/dotnet-grpc/Internal/CLIToolException.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | 20 | namespace Grpc.Dotnet.Cli.Internal; 21 | 22 | internal sealed class CLIToolException : Exception 23 | { 24 | public CLIToolException(string message) : base(message) { } 25 | } 26 | -------------------------------------------------------------------------------- /src/dotnet-grpc/Options/Access.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Dotnet.Cli.Options; 20 | 21 | internal enum Access 22 | { 23 | // Default is Public 24 | Public = 0, 25 | Internal 26 | } 27 | -------------------------------------------------------------------------------- /src/dotnet-grpc/Options/Services.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.Dotnet.Cli.Options; 20 | 21 | internal enum Services 22 | { 23 | // Default is Both 24 | Default = 0, 25 | Both, 26 | Server, 27 | Client, 28 | None 29 | } 30 | -------------------------------------------------------------------------------- /startvs.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | :: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET Core SDK. 4 | 5 | :: This tells .NET Core to use the same dotnet.exe that build scripts use 6 | SET DOTNET_ROOT=%~dp0.dotnet 7 | 8 | :: This tells .NET Core not to go looking for .NET Core in other places 9 | SET DOTNET_MULTILEVEL_LOOKUP=0 10 | 11 | :: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use 12 | SET PATH=%DOTNET_ROOT%;%PATH% 13 | 14 | SET sln=%1 15 | 16 | IF "%sln%"=="" ( 17 | SET sln=Grpc.DotNet.sln 18 | ) 19 | 20 | IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" ( 21 | echo .NET Core has not yet been installed. Run `%~dp0build\get-dotnet.ps1` to install tools and activate the environment with `. %~dp0activate.ps1` 22 | exit /b 1 23 | ) 24 | 25 | start %sln% 26 | -------------------------------------------------------------------------------- /test/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/FunctionalTests/Infrastructure/TestConstants.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.FunctionalTests.Infrastructure; 20 | 21 | internal static class TestConstants 22 | { 23 | public const string ServerCallHandlerTestName = "SERVER Grpc.AspNetCore.Server.ServerCallHandler"; 24 | } 25 | -------------------------------------------------------------------------------- /test/FunctionalTests/Infrastructure/TestServerEndpointName.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.FunctionalTests.Infrastructure; 20 | 21 | public enum TestServerEndpointName 22 | { 23 | Http2, 24 | Http1, 25 | Http2WithTls, 26 | Http1WithTls, 27 | UnixDomainSocket, 28 | Http3WithTls, 29 | } 30 | -------------------------------------------------------------------------------- /test/FunctionalTests/localhost.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/test/FunctionalTests/localhost.pfx -------------------------------------------------------------------------------- /test/FunctionalTests/server1.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/test/FunctionalTests/server1.pfx -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/Certs/outlookcom.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/test/Grpc.AspNetCore.Server.Tests/Certs/outlookcom.crt -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/CustomMetadata.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | 20 | namespace Grpc.AspNetCore.Server.Tests.TestObjects; 21 | 22 | public class CustomMetadata 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithAttribute/GreeterWithAttributeService.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithAttribute; 20 | 21 | public class GreeterWithAttributeService : GreeterWithAttribute.GreeterBase 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithAttribute/GreeterWithAttributeServiceSubClass.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithAttribute; 20 | 21 | public class GreeterWithAttributeServiceSubClass : GreeterWithAttributeService 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithAttribute/GreeterWithAttributeServiceSubSubClass.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithAttribute; 20 | 21 | public class GreeterWithAttributeServiceSubSubClass : GreeterWithAttributeServiceSubClass 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithoutAttribute/GreeterWithoutAttributeService.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithoutAttribute; 20 | 21 | public class GreeterWithoutAttributeService : GreeterWithoutAttribute.GreeterBase 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithoutAttribute/GreeterWithoutAttributeServiceSubClass.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithoutAttribute; 20 | 21 | public class GreeterWithoutAttributeServiceSubClass : GreeterWithoutAttributeService 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.AspNetCore.Server.Tests/TestObjects/Services/WithoutAttribute/GreeterWithoutAttributeServiceSubSubClass.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace Grpc.AspNetCore.Server.Tests.TestObjects.Services.WithoutAttribute; 20 | 21 | public class GreeterWithoutAttributeServiceSubSubClass : GreeterWithoutAttributeServiceSubClass 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /test/Grpc.Core.Api.Tests/Grpc.Core.Api.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net462;net6.0 4 | true 5 | true 6 | 7 | 8 | disable 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net462;net6.0 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/Grpc.Net.Client.Tests/Infrastructure/Http2StreamException.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | #if !NET7_0_OR_GREATER 20 | namespace System.Net.Http; 21 | 22 | public class Http2StreamException : Exception 23 | { 24 | public Http2StreamException(string message) : base(message) 25 | { 26 | } 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /test/Grpc.Net.Client.Tests/Infrastructure/QuicStreamAbortedException.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | #if !NET7_0_OR_GREATER 20 | namespace System.Net.Quic; 21 | 22 | public class QuicStreamAbortedException : Exception 23 | { 24 | public QuicStreamAbortedException(string message) : base(message) 25 | { 26 | } 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /test/Grpc.Reflection.Tests/Grpc.Reflection.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net462;net6.0 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/Grpc.StatusProto.Tests/Grpc.StatusProto.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net462;net6.0;net7.0;net8.0;net9.0 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/Shared/Logging/BeginScopeContext.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #nullable disable 5 | 6 | // Copied with permission from https://github.com/dotnet/aspnetcore/tree/08b60af1bca8cffff8ba0a72164fb7505ffe114d/src/Testing/src/Logging 7 | namespace Microsoft.Extensions.Logging.Testing; 8 | 9 | public class BeginScopeContext 10 | { 11 | public object Scope { get; set; } 12 | 13 | public string LoggerName { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /test/Shared/Logging/ITestSink.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #nullable disable 5 | 6 | using System; 7 | using System.Collections.Concurrent; 8 | 9 | // Copied with permission from https://github.com/dotnet/aspnetcore/tree/08b60af1bca8cffff8ba0a72164fb7505ffe114d/src/Testing/src/Logging 10 | namespace Microsoft.Extensions.Logging.Testing; 11 | 12 | public interface ITestSink 13 | { 14 | event Action MessageLogged; 15 | 16 | event Action ScopeStarted; 17 | 18 | Func WriteEnabled { get; set; } 19 | 20 | Func BeginEnabled { get; set; } 21 | 22 | IProducerConsumerCollection Scopes { get; set; } 23 | 24 | IProducerConsumerCollection Writes { get; set; } 25 | 26 | void Write(WriteContext context); 27 | 28 | void Begin(BeginScopeContext context); 29 | } 30 | -------------------------------------------------------------------------------- /test/Shared/Logging/LogLevelAttribute.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #nullable disable 5 | 6 | using System; 7 | 8 | // Copied with permission from https://github.com/dotnet/aspnetcore/tree/08b60af1bca8cffff8ba0a72164fb7505ffe114d/src/Testing/src/Logging 9 | namespace Microsoft.Extensions.Logging.Testing; 10 | 11 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = false)] 12 | public class LogLevelAttribute : Attribute 13 | { 14 | public LogLevelAttribute(LogLevel logLevel) 15 | { 16 | LogLevel = logLevel; 17 | } 18 | 19 | public LogLevel LogLevel { get; } 20 | } 21 | -------------------------------------------------------------------------------- /test/Shared/Logging/TestLoggerFactory.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #nullable disable 5 | 6 | // Copied with permission from https://github.com/dotnet/aspnetcore/tree/08b60af1bca8cffff8ba0a72164fb7505ffe114d/src/Testing/src/Logging 7 | namespace Microsoft.Extensions.Logging.Testing; 8 | 9 | public class TestLoggerFactory : ILoggerFactory 10 | { 11 | private readonly ITestSink _sink; 12 | private readonly bool _enabled; 13 | 14 | public TestLoggerFactory(ITestSink sink, bool enabled) 15 | { 16 | _sink = sink; 17 | _enabled = enabled; 18 | } 19 | 20 | public ILogger CreateLogger(string name) 21 | { 22 | return new TestLogger(name, _sink, _enabled); 23 | } 24 | 25 | public void AddProvider(ILoggerProvider provider) 26 | { 27 | } 28 | 29 | public void Dispose() 30 | { 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test/Shared/Logging/TestLoggerProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #nullable disable 5 | 6 | // Copied with permission from https://github.com/dotnet/aspnetcore/tree/08b60af1bca8cffff8ba0a72164fb7505ffe114d/src/Testing/src/Logging 7 | namespace Microsoft.Extensions.Logging.Testing; 8 | 9 | public class TestLoggerProvider : ILoggerProvider 10 | { 11 | private readonly ITestSink _sink; 12 | 13 | public TestLoggerProvider(ITestSink sink) 14 | { 15 | _sink = sink; 16 | } 17 | 18 | public ILogger CreateLogger(string categoryName) 19 | { 20 | return new TestLogger(categoryName, _sink, enabled: true); 21 | } 22 | 23 | public void Dispose() 24 | { 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/DuplicateProjects/client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/DuplicateProjects/server.csproj: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/EmptyProject/Proto/a.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/test/dotnet-grpc.Tests/TestAssets/EmptyProject/Proto/a.proto -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/EmptyProject/Proto/b.proto: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/EmptyProject/test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/MultipleReferences/test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://contoso.com/greet.proto 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/ProjectWithReference/Proto/a.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/test/dotnet-grpc.Tests/TestAssets/ProjectWithReference/Proto/a.proto -------------------------------------------------------------------------------- /test/dotnet-grpc.Tests/TestAssets/ProjectWithReference/test.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | https://contoso.com/greet.proto 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /testassets/BenchmarkWorkerWebsite/README.md: -------------------------------------------------------------------------------- 1 | Implementation of benchmark worker that is compatible with the gRPC benchmarking stack: 2 | https://grpc.io/docs/guides/benchmarking.html 3 | 4 | 5 | -------------------------------------------------------------------------------- /testassets/Certs/InteropTests/README.md: -------------------------------------------------------------------------------- 1 | Keys taken from https://github.com/grpc/grpc/tree/master/src/core/tsi/test_creds 2 | so that interop server in this project is compatible with interop clients 3 | implemented in other gRPC languages. 4 | 5 | The server1.pem and server1.key were combined into server1.pfx. The password is 1111. These certs are not secure, do not use in production. 6 | ``` 7 | openssl pkcs12 -export -out server1.pfx -inkey server1.key -in server1.pem -certfile ca.pem 8 | ``` 9 | -------------------------------------------------------------------------------- /testassets/Certs/InteropTests/server1.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grpc/grpc-dotnet/1cb0fdb29a9af45fa145dd85a69bf0b3e51e6f0e/testassets/Certs/InteropTests/server1.pfx -------------------------------------------------------------------------------- /testassets/FunctionalTestsWebsite/Infrastructure/DynamicService.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace FunctionalTestsWebsite.Infrastructure; 20 | 21 | public class DynamicService 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /testassets/FunctionalTestsWebsite/Infrastructure/IncrementingCounter.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace FunctionalTestsWebsite.Infrastructure; 20 | 21 | public class IncrementingCounter 22 | { 23 | public void Increment(int amount) 24 | { 25 | Count += amount; 26 | } 27 | 28 | public int Count { get; private set; } 29 | } 30 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebClient/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

Sorry, there's nothing at this address.

8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebClient/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @inject IJSRuntime JSRuntime; 3 | 4 |

gRPC-Web interop tests

5 | 6 |
7 | 14 | 15 | 16 |
17 | 18 |
    19 | @foreach (var message in Messages) 20 | { 21 |
  • 22 | @message.Content 23 |
  • 24 | } 25 |
-------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebClient/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | @Body 5 |
6 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebClient/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Threading 3 | @using Microsoft.AspNetCore.Components.Forms 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.AspNetCore.Components.Web 6 | @using Microsoft.JSInterop 7 | @using InteropTestsGrpcWebClient 8 | @using InteropTestsGrpcWebClient.Shared 9 | @using Grpc.Net.Client 10 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env 2 | WORKDIR /app 3 | 4 | # Copy everything 5 | COPY . ./ 6 | RUN dotnet --info 7 | RUN dotnet restore testassets/InteropTestsGrpcWebWebsite 8 | RUN dotnet publish testassets/InteropTestsGrpcWebWebsite -c Release -o out 9 | 10 | # Build runtime image 11 | FROM mcr.microsoft.com/dotnet/aspnet:9.0 12 | WORKDIR /app 13 | COPY --from=build-env /app/out . 14 | ENTRYPOINT ["dotnet", "InteropTestsGrpcWebWebsite.dll", "--urls", "http://+:80"] 15 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/InteropTestsGrpcWebWebsite.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net9.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Tests/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Tests/__tests__/interoptests.js: -------------------------------------------------------------------------------- 1 | describe('gRPC-Web interop tests', () => { 2 | test.each(global.__GRPC_WEB_TEST_NAMES__)('Run %s (grpc-web)', async (testName) => { 3 | var result = await page.evaluate((n) => runTest(n, "GrpcWeb"), testName); 4 | expect(result).toBe("Success"); 5 | }); 6 | 7 | test.each(global.__GRPC_WEB_TEXT_TEST_NAMES__)('Run %s (grpc-web-text)', async (testName) => { 8 | var result = await page.evaluate((n) => runTest(n, "GrpcWebText"), testName); 9 | expect(result).toBe("Success"); 10 | }); 11 | }); -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Tests/jest-puppeteer.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | launch: { 3 | dumpio: true, 4 | headless: true, 5 | }, 6 | browserContext: 'default', 7 | } -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Tests/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: "./custom-environment.js", 3 | verbose: true, 4 | preset: "jest-puppeteer" 5 | }; -------------------------------------------------------------------------------- /testassets/InteropTestsGrpcWebWebsite/Tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grpc-web_interop_tests", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "test": "jest test" 7 | }, 8 | "dependencies": { 9 | "jest": "^29.7.0", 10 | "jest-puppeteer": "^10.0.1", 11 | "puppeteer": "^23.0.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /testassets/InteropTestsNativeServer/InteropTestsNativeServer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net9.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | PreserveNewest 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /testassets/InteropTestsNativeServer/Program.cs: -------------------------------------------------------------------------------- 1 | #region Copyright notice and license 2 | 3 | // Copyright 2019 The gRPC Authors 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | 17 | #endregion 18 | 19 | namespace InteropTestsNativeWebsite; 20 | 21 | public class Program 22 | { 23 | public static void Main(string[] args) 24 | { 25 | InteropServer.Run(args); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /testassets/InteropTestsNativeServer/README.md: -------------------------------------------------------------------------------- 1 | # Interop Tests Native Server 2 | 3 | This project is a copy of [InteropServer.cs](https://github.com/grpc/grpc/blob/912653e3ce504b9148409e577bc2028c4454d89c/src/csharp/Grpc.IntegrationTesting/InteropServer.cs) from https://github.com/grpc/grpc. The C# C Core native server is copied here to allow easier initial testing of the managed gRPC client against C Core. It could be removed from this repo in the future. 4 | 5 | The authoritative copy of the interop tests is https://github.com/grpc/grpc. This copy may become out of date. 6 | -------------------------------------------------------------------------------- /testassets/InteropTestsWebsite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env 2 | WORKDIR /app 3 | 4 | # Copy everything 5 | COPY . ./ 6 | RUN dotnet --info 7 | RUN dotnet restore testassets/InteropTestsWebsite 8 | RUN dotnet publish testassets/InteropTestsWebsite --framework net9.0 -c Release -o out -p:LatestFramework=true 9 | 10 | # Build runtime image 11 | FROM mcr.microsoft.com/dotnet/aspnet:9.0 12 | WORKDIR /app 13 | COPY --from=build-env /app/out . 14 | ENTRYPOINT ["dotnet", "InteropTestsWebsite.dll", "--port_http1", "80"] -------------------------------------------------------------------------------- /testassets/InteropTestsWebsite/README.md: -------------------------------------------------------------------------------- 1 | Running Grpc.Core interop client against Grpc.AspNetCore.Server interop server. 2 | Context: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md 3 | 4 | ## Start the InteropTestsWebsite 5 | 6 | ``` 7 | # From this directory 8 | $ dotnet run 9 | Now listening on: http://localhost:50052 10 | ``` 11 | 12 | ## Build gRPC C# as a developer: 13 | Follow https://github.com/grpc/grpc/tree/master/src/csharp 14 | ``` 15 | python tools/run_tests/run_tests.py -l csharp -c dbg --build_only 16 | ``` 17 | 18 | ## Running the interop client 19 | 20 | ``` 21 | cd src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 22 | 23 | mono Grpc.IntegrationTesting.Client.exe --server_host=localhost --server_port=50052 --test_case=large_unary 24 | ``` 25 | 26 | NOTE: Currently the some tests will fail because not all the features are implemented 27 | by Grpc.AspNetCore.Server 28 | -------------------------------------------------------------------------------- /testassets/Proto/authorize.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package authorize; 18 | 19 | // The greeting service definition. 20 | service AuthorizedGreeter { 21 | rpc SayHello (HelloRequest) returns (HelloReply); 22 | } 23 | 24 | message HelloRequest { 25 | string name = 1; 26 | } 27 | 28 | message HelloReply { 29 | string message = 1; 30 | map claims = 2; 31 | } 32 | -------------------------------------------------------------------------------- /testassets/Proto/chat.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package chat; 18 | 19 | // The greeting service definition. 20 | service Chatter { 21 | // Sends a greeting 22 | rpc Chat (stream ChatMessage) returns (stream ChatMessage); 23 | } 24 | 25 | // The chat message. 26 | message ChatMessage { 27 | string name = 1; 28 | string message = 2; 29 | } 30 | -------------------------------------------------------------------------------- /testassets/Proto/nested.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package nested; 18 | 19 | service NestedService { 20 | rpc SayHello (HelloRequest) returns (HelloReply); 21 | } 22 | 23 | message HelloRequest { 24 | string name = 1; 25 | } 26 | 27 | message HelloReply { 28 | string message = 1; 29 | } 30 | -------------------------------------------------------------------------------- /testassets/Proto/race.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package Race; 18 | 19 | service Racer { 20 | rpc ReadySetGo (stream RaceMessage) returns (stream RaceMessage); 21 | } 22 | 23 | message RaceMessage { 24 | int32 count = 1; 25 | } 26 | -------------------------------------------------------------------------------- /testassets/Proto/unimplemented.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The gRPC Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package unimplemented; 18 | 19 | // No service is registered on the server so methods will return unimplemented 20 | service UnimplementedService { 21 | rpc DuplexData (stream UnimplementeDataMessage) returns (stream UnimplementeDataMessage); 22 | } 23 | 24 | message UnimplementeDataMessage { 25 | bytes data = 1; 26 | } --------------------------------------------------------------------------------