Compare commits

...

265 Commits

Author SHA1 Message Date
Shimmy d07efb500c
Add protobuf-net code-first to README.md (#2644)
Co-authored-by: James Newton-King <james@newtonking.com>
2025-06-26 08:39:36 +08:00
dependabot[bot] 9764314a84
Bump pbkdf2 from 3.1.2 to 3.1.3 in /examples/Spar/Server/ClientApp (#2642)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-24 13:43:24 +08:00
James Newton-King 3bd324e325
Fix shared code (#2640) 2025-06-24 11:39:09 +08:00
dependabot[bot] add543720d
Bump brace-expansion in /testassets/InteropTestsGrpcWebWebsite/Tests (#2639)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-13 11:10:16 +08:00
James Newton-King 44b243fb00
MapGrpcService with service definition refactor (#2634)
Co-authored-by: aka-nse <nakase.d1220@gmail.com>
2025-06-13 09:23:01 +08:00
dependabot[bot] 66df240b07
Bump tar-fs in /testassets/InteropTestsGrpcWebWebsite/Tests (#2636)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-13 09:00:08 +08:00
James Newton-King 1cb0fdb29a
Migrate from sln to slnx (#2635) 2025-05-30 11:24:19 +08:00
Casper Verhaar 85787a7ce2
Remove reference to obsolete property from Readme and mention alternative (#2631) 2025-05-29 11:56:14 +08:00
James Newton-King d170b24e9d
Update NuGet package versions (#2620) 2025-04-10 08:45:17 +08:00
apolcyn b1af190d8c
bump tools package to 2.71 (#2621) 2025-04-09 15:17:09 -07:00
James Newton-King 6f03f0e0b5
Fix race condition that caused inprogress connect to be canceled (#2618) 2025-04-09 21:06:56 +08:00
dependabot[bot] 30553b5624
Bump tar-fs in /testassets/InteropTestsGrpcWebWebsite/Tests (#2619)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.6 to 3.0.8.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.6...v3.0.8)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 18:09:07 +08:00
dependabot[bot] 2aed7b5ef3
Bump @babel/helpers in /testassets/InteropTestsGrpcWebWebsite/Tests (#2616)
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.25.0 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 17:07:45 +08:00
dependabot[bot] 06cd2a9f7a
Bump axios in /testassets/InteropTestsGrpcWebWebsite/Tests (#2615)
Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.8.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.4...v1.8.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 17:07:32 +08:00
James Newton-King 5816e69828
Remove old dotnet-core feed (#2611) 2025-03-07 07:33:39 +08:00
apolcyn 147a4647ad
bump Grpc.Tools dep (#2603) 2025-02-25 14:46:09 +08:00
James Newton-King 852a118c7b
Move updating connectivity state outside of subchannel lock (#2601) 2025-02-25 08:19:30 +08:00
dependabot[bot] 60d9d2ce15
Bump elliptic from 6.6.0 to 6.6.1 in /examples/Spar/Server/ClientApp (#2599)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-19 07:28:54 +08:00
James Newton-King a2f7d06e02
Avoid using ConcurrentDictionary for channels with few methods (#2597)
Co-authored-by: Günther Foidl <gue@korporal.at>
2025-02-19 07:17:50 +08:00
James Newton-King c9d26719e8
Complete health checks watch service on server shutting down (#2582) 2024-12-12 10:17:08 +08:00
Henrik b7af033360
Performance microoptimizations (#2558)
Co-authored-by: James Newton-King <james@newtonking.com>
2024-12-09 18:03:21 +08:00
Dexter Ajoku 6a3c9774f6
Refactor: Use `await using` for `packageVersionStream` to ensure proper disposal of async resources (#2521) 2024-12-09 08:54:24 +08:00
subhraOffGit cacf59d942
[vote]Added Active maintainers into MAINTAINERS.md. (#2449) 2024-12-09 08:49:13 +08:00
dependabot[bot] be98a74f68
Bump cross-spawn from 7.0.3 to 7.0.6 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2574)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 08:48:58 +08:00
dependabot[bot] 42593dde65
Bump vue from 2.6.14 to 3.0.0 in /examples/Spar/Server/ClientApp (#2565)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 08:48:20 +08:00
Henrik 651a0cb64a
Correctness: Make some private & internal classes sealed where possible (#2559) 2024-12-09 08:38:01 +08:00
Weihan Li 3bf19a113c
use nameof for CallerArgumentExpression (#2562) 2024-12-09 08:36:19 +08:00
Weihan Li b6cfbd05e9
update ArgumentNullException.ThrowIfNull usage (#2563) 2024-12-09 08:35:21 +08:00
James Newton-King 5a58c24efc
Update to .NET 9 RTM (#2571) 2024-11-15 06:47:13 +08:00
dependabot[bot] dacb7b41ea
Bump elliptic from 6.5.7 to 6.6.0 in /examples/Spar/Server/ClientApp (#2567)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.7 to 6.6.0.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.0)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-31 13:34:00 +08:00
James Newton-King 1732f28dc6
Update package dependencies to 9.0 RC2 (#2560) 2024-10-24 04:06:42 +08:00
James Newton-King 5fffc489f7
Fix System.Text.Json vulnerability warning (#2556) 2024-10-11 06:51:57 +08:00
James Newton-King b88713e83f
Update Grpc.Tools to 2.67.0 (#2554) 2024-10-09 13:52:55 +08:00
James Newton-King 0f2ffdc03e
Fix UpdateBalancingState not called when address attributes are modified (#2553) 2024-10-09 10:01:33 +08:00
James Newton-King 490894cded
Cleanup gRPC unit testing helpers in tester sample (#2548) 2024-10-02 08:10:26 +08:00
James Newton-King df3d8dc996
Update to Grpc.Tools 2.67.0-pre1 (#2547) 2024-10-01 14:24:32 +08:00
dependabot[bot] b1df3e4c76
Bump serve-static from 1.14.2 to 1.16.2 in /examples/Spar/Server/ClientApp (#2536)
Bumps [serve-static](https://github.com/expressjs/serve-static) from 1.14.2 to 1.16.2.
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/v1.16.2/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.14.2...v1.16.2)

---
updated-dependencies:
- dependency-name: serve-static
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 21:54:20 +08:00
Noam Greenberg de9a82fe8e
Update logging to use generated logs (#2531) 2024-09-12 22:31:10 +08:00
James Newton-King 3ed9fb9f31
Log server cancellation errors at info level (#2527) 2024-09-07 14:08:46 +08:00
Varorbc 5322d6b813
precompile condition clean (#2528) 2024-09-07 14:08:07 +08:00
dependabot[bot] 439a3b80b5
Bump micromatch from 4.0.7 to 4.0.8 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2524)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 07:52:06 +08:00
dependabot[bot] b3429b9061
Bump elliptic from 6.5.4 to 6.5.7 in /examples/Spar/Server/ClientApp (#2525)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.4 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.4...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 07:51:42 +08:00
dependabot[bot] 30255261ad
Bump webpack from 5.76.0 to 5.94.0 in /examples/Browser/Server/wwwroot (#2522)
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.0...v5.94.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-06 07:28:04 +08:00
apolcyn bf41c89ace
Bump grpc.tools version to 2.66 (#2523) 2024-09-06 07:03:01 +08:00
James Newton-King e9cc7e1579
Add HTTP version configuration to GrpcChannelOptions (#2514)
Co-authored-by: Andrew Casey <amcasey@users.noreply.github.com>
2024-08-22 07:53:14 +08:00
apolcyn 26227c3e7a
[testing] improve sanity check in jwt_token_creds interop test (#2513) 2024-08-21 10:06:52 +08:00
James Newton-King dd4adce098
Fix Google auth interop test (#2512)
* Downgrade Google auth

* Suppress warning

* 1.57.0

* Update to latest and improve test
2024-08-20 13:36:36 -07:00
James Newton-King c397bc7804
Remove internal_ci flag from interop test script (#2509) 2024-08-16 17:13:23 +08:00
James Newton-King 74ee5f0ebf
Update puppeteer (#2507) 2024-08-15 08:23:06 +08:00
dependabot[bot] a732f517ea
Bump axios from 1.6.2 to 1.7.4 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2505)
Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.2...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 12:20:47 +08:00
dependabot[bot] a156ca9955
Bump braces from 3.0.2 to 3.0.3 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2504)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 12:20:29 +08:00
Sébastien Ros cd875d9097
Update .NET 9 SDK and resolve warnings (#2502)
Co-authored-by: James Newton-King <james@newtonking.com>
2024-08-14 12:08:04 +08:00
Mayuki Sawatari 540e87bf70
Fix failure to create GrpcChannel under Wine compatibility layer (including Steam Proton and Apple Game Porting Toolkit) (#2496) 2024-07-30 11:21:36 +08:00
Stanley Cheung b34d553e44
Bump version on master to 2.66.0-dev (#2491) 2024-07-19 18:39:01 -07:00
Stanley Cheung 35b63dad57
Bump Grpc.Tools version to 2.65.0 (#2488) 2024-07-19 16:37:17 +08:00
James Newton-King 6448783899
Reduce usage of RunContinuationsAsynchronously (#2478) 2024-07-11 22:48:10 +08:00
Stanley Cheung aab5b2b798
Bump master version to 2.65.0-dev (#2472) 2024-06-28 13:52:12 -07:00
William Rall 4623318100
Update Native.DetectWindowsVersion() to consider Windows Server 2019 to be Window Server (#2468) 2024-06-26 16:04:45 +08:00
James Newton-King 1416340c85
Fix flaky ConnectTimeout_MultipleCalls_AttemptReconnect test (#2460) 2024-06-13 11:18:15 +08:00
James Newton-King 64f6a0958a
Update repo for .NET 9 (#2457) 2024-06-13 11:05:43 +08:00
James Newton-King 434a5ba26b
Add WriteResponseHeadersAsync test (#2452)
Co-authored-by: Brennan <brecon@microsoft.com>
2024-06-07 07:43:13 +08:00
James Newton-King 5e6821cbe3
Change functional tests to use dynamic ports (#2458) 2024-06-07 06:29:20 +08:00
James Newton-King b57c87f2a9
Update Grpc.Tools to 2.64.0 (#2456) 2024-06-06 08:50:18 +08:00
James Newton-King 775d1fba1c
Update various package versions (#2453) 2024-06-06 08:14:59 +08:00
James Newton-King 0ea0112ec8
Assign primary handler before other configuration (#2445) 2024-06-05 10:07:47 +08:00
James Newton-King 84a4fcb697
Support some HttpClientAction settings and log debug message instead of an error (#2448) 2024-06-05 06:43:36 +08:00
Weihan Li bca64852ba
build: configure rollForward in global.json (#2437) 2024-05-30 12:07:35 +08:00
Weihan Li ef1f0d209c
ci: upgrade checkout action version (#2434)
upgrade checkout action version to fix the ci build warning
2024-05-09 12:24:17 +08:00
Weihan Li 9ad10a9196
doc: fix typo (#2431) 2024-05-09 07:27:20 +08:00
Weihan Li 4b6ecea955
doc: fix typo (#2432)
fix `algorithm` typo
2024-05-08 20:38:41 +08:00
apolcyn 989420e709
Update Grpc.Tools to 2.63 (#2429) 2024-05-07 16:18:49 -07:00
James Newton-King c80f4594d0
Don't capture async locals in resolver (#2426) 2024-05-03 07:06:05 +08:00
James Newton-King 63914f2653
Add semaphore to limit subchannel connect to prevent race conditions (#2422) 2024-04-30 18:38:27 +08:00
James Newton-King 8199f66422
Fix HTTP/3 test errors on .NET 6 (#2423) 2024-04-29 20:37:40 +08:00
James Newton-King 2d9df5892c
Fix memory leak when using call context propagation with cancellation token (#2421) 2024-04-29 20:37:31 +08:00
James Newton-King c9c902c8da
Enable multiple connections with WinHttpHandler by default (#2416) 2024-04-19 06:53:25 +08:00
Drew Noakes 2a36215697
Fix ObjectDisposedException message (#2415) 2024-04-17 15:44:04 +08:00
Weihan Li 9cd97cebca
support `ReadAllAsync` for netstandard2.0 (#2411)
Co-authored-by: James Newton-King <james@newtonking.com>
2024-04-17 15:27:33 +08:00
James Thompson c04d01a0ac
#2401 Add new TFM's so package dependency can be removed (#2402)
Co-authored-by: James Newton-King <james@newtonking.com>
2024-04-17 15:26:43 +08:00
Weihan Li add886e45b
Update Directory.Packages.props (#2413)
Co-authored-by: James Newton-King <james@newtonking.com>
2024-04-17 14:24:11 +08:00
James Newton-King f2709f1bf5
Interrupt existing subchannel connect attempt when reconnect is requested (#2410) 2024-04-13 13:39:16 +08:00
Jakub Januszkiewicz a4d83f6d75
fix a couple typos in README.md (#2397) 2024-04-12 20:49:48 +08:00
James Newton-King a51fec8ff1
Update microsoft-support.md (#2403) 2024-04-05 06:09:28 +08:00
dependabot[bot] 874cd11637
Bump follow-redirects from 1.15.4 to 1.15.6 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2392)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 08:27:13 +08:00
James Newton-King 933023b6f8
Prevent block inside ResolveAsync from blocking PollingResolver.Refresh (#2385) 2024-03-12 15:50:49 +08:00
apolcyn f29d927f42
update Grpc.Tools version to 2.62 (#2382) 2024-03-07 15:50:17 -08:00
James Newton-King 098dca892a
Fix OS detection error in UWP (#2376) 2024-02-27 10:27:13 +08:00
Sébastien Ros 787faa64c7
Set default streams value in grpc-client.yml (#2379) 2024-02-27 08:08:33 +08:00
apolcyn da2038226c
Merge pull request #2370 from apolcyn/bump_branch
Bump Grpc.Tools to 1.61.0
2024-02-07 16:52:00 -08:00
Alexander Polcyn 7cd4bc2447 bump Grpc.Tools 2024-02-07 21:07:42 +00:00
Tom Kerkhove 6d1ea08ce3
proposal: Build changelog based on previous stable version (#2269)
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Steve Dougherty <steve@asksteved.com>
2024-02-06 08:24:50 +08:00
James Newton-King 1a8435477f
Add missing package mapping for net9 feed (#2366) 2024-02-06 06:39:55 +08:00
James Newton-King 7f5b4574aa
Add .NET 9 NuGet feed (#2365) 2024-01-31 05:39:49 +08:00
James Newton-King 3103c6937f
Allow GrpcChannel to use WinHttpHandler on Windows Server 2019 (#2362) 2024-01-18 08:05:06 +08:00
James Newton-King 0cad7497d0
Add key services tests for service and interceptor (#2356) 2024-01-11 20:18:14 +08:00
dependabot[bot] 4b0b3589db
Bump follow-redirects from 1.15.3 to 1.15.4 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2352)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 19:11:24 +08:00
James Newton-King e5c9528912
Grpc.StatusProto clean up (#2349) 2024-01-09 07:59:41 +08:00
James Newton-King abaaf4415c
Add ProtoStatus example (#2273) 2024-01-09 07:59:02 +08:00
tony 934bcec442
First pass at Grpc.StatusProto API (#2205) 2024-01-04 11:03:03 +08:00
James Newton-King f075c79e18
Fix cancellation token reported when using retries (#2345) 2024-01-03 07:29:05 +08:00
Stanley Cheung 87cce280d7
Bump dev version to 2.61.0-dev on master branch (#2337) 2023-12-13 16:52:53 -08:00
James Newton-King 998a8cc63b
Update Grpc.Tools to 2.60.0 (#2336) 2023-12-13 07:36:08 +08:00
James Newton-King 1625f89427
Trim regex from Grpc.AspNetCore (#2326) 2023-11-28 08:37:10 +08:00
James Newton-King 2bbb977dd2
Add Native AOT test (#2324) 2023-11-21 09:01:25 +08:00
James Newton-King ca9b756d73
Update to use Directory.Packages.props (#2315) 2023-11-18 12:55:16 +08:00
James Newton-King 4a60f414a1
Update to GA .NET 8 SDK (#2321) 2023-11-17 08:06:17 +08:00
dependabot[bot] e5afb085e0
Bump browserify-sign from 4.2.1 to 4.2.2 in /examples/Spar/Server/ClientApp (#2311)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 12:53:14 +08:00
dependabot[bot] 5e505b017a
Bump axios and wait-on in /testassets/InteropTestsGrpcWebWebsite/Tests (#2322)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 12:52:53 +08:00
dependabot[bot] 8d33f094d2
Bump @babel/traverse from 7.21.4 to 7.23.2 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2300)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 12:30:50 +08:00
apolcyn e52049a94d
Merge pull request #2303 from apolcyn/update_59
Update grpc tools to 2.59
2023-10-24 11:56:11 -07:00
Alexander Polcyn 51ad5ab757 update grpc tools to 2.59 2023-10-19 17:06:17 +00:00
dependabot[bot] 3c4abbada1
Bump @babel/traverse from 7.17.3 to 7.23.2 in /examples/Spar/Server/ClientApp (#2298)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 08:26:41 +08:00
James Newton-King 91be3925c1
Fix HttpContext race by copying values to reader and writer (#2294) 2023-10-18 08:26:12 +08:00
apolcyn 683fbdfa5c
Merge pull request #2290 from apolcyn/bump_deps
Bump GrpcToolsPackageVersion to 2.58.0
2023-10-06 16:41:54 -07:00
Alexander Polcyn bad41ff570 bump GrpcToolsPackageVersion to 2.58.0 2023-10-06 17:07:13 +00:00
James Newton-King 207e8066f3
Dispose socket after connection failure (#2287) 2023-10-03 09:09:49 +08:00
James Newton-King 97f6fbd3fe
Fix detecting inherited WinHttpHandler (#2288) 2023-10-03 09:09:27 +08:00
James Newton-King 7e62218646
Add debugger display to Status (#2281) 2023-09-28 07:14:13 +08:00
James Newton-King 46480fca2f
Remove netstandard1.5 from some projects (#2279) 2023-09-21 21:50:13 +08:00
James Newton-King 40a26c9877
Support disabling load balancing with SocketsHttpHandler.Properties (#2274) 2023-09-12 13:33:15 +08:00
James Newton-King 246c43d457
Add request and channel to call debugging (#2271) 2023-09-06 10:27:29 +08:00
James Newton-King 91130a7c89
Update ServiceBinderBase.AddMethod annotations to allow null handler (#2270) 2023-09-05 21:50:58 +08:00
Jan Tattermusch 3f90844449
Start 2.58 development cycle. (#2267)
* Update version.props

* Update VersionInfo.cs
2023-08-31 16:17:08 +02:00
James Newton-King b50e46f851
Fix connection bugs from BalancerAddress changes (#2265) 2023-08-31 08:09:32 +08:00
James Newton-King 311f8784c6
Change subchannel BalancerAddress when attributes change (#2228) 2023-08-30 11:56:19 +08:00
James Newton-King b421751176
Fix unobserved exceptions with retries (#2255) 2023-08-29 09:19:51 +08:00
James Newton-King 41f67ad900
Log socket lifetime when closing unusable sockets (#2258) 2023-08-26 10:22:53 +08:00
James Newton-King a9e810c3df
Update call debugger display to show status code (#2259) 2023-08-26 10:21:57 +08:00
James Newton-King 6429ae2f57
Reduce logger allocations by not using generic CreateLogger (#2256) 2023-08-26 10:21:12 +08:00
James Newton-King 3db1683820
Add transport status to subchannel picked log (#2261) 2023-08-26 09:30:59 +08:00
Jan Tattermusch 01049834be
Update Grpc.Tools dependency to 2.57.0 (#2257) 2023-08-25 10:47:38 +02:00
James Newton-King ca3f2b9d51
Change subchannel ID to include a channel ID (#2253) 2023-08-24 20:50:24 +08:00
Jan Tattermusch aa2bc14f5e
upgrade QpsWorker to net8 (#2250) 2023-08-22 10:48:51 +02:00
James Newton-King a970fec15d
Clear IAsyncStreamReader<T>.Current value before reading next value (#2248) 2023-08-21 11:31:46 +08:00
James Newton-King 89dd217257
Update Grpc.Net.Client to use ActivitySource (#2244) 2023-08-18 07:37:19 +08:00
James Newton-King 2b1da779bf
Force yielding after awaiting CallTask to avoid holding onto locks (#2245) 2023-08-16 09:05:50 +08:00
dependabot[bot] 6ca24ef45b
Bump semver from 6.3.0 to 6.3.1 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2243)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 11:57:15 +08:00
James Newton-King 5a8e2baf37
Update to use .NET 8 (#2021) 2023-08-15 10:19:29 +08:00
James Newton-King 854e0fd3d0
Update implementation_comparison.md (#2240) 2023-08-12 10:58:05 +08:00
James Newton-King 22a9549897
Update OS version detection to get version directly from Windows (#2239) 2023-08-12 08:17:32 +08:00
James Newton-King 870bf8443f
Improve comment in GrpcChannel for WinHttpHandler + OS validation (#2237) 2023-08-10 09:07:28 +08:00
James Newton-King 89e6611d2d
Fix load balancing flaky test (#2223) 2023-08-10 08:34:02 +08:00
James Newton-King a61e11f1e0
Consistently don't log message errors on cancellation (#2221) 2023-08-10 08:31:58 +08:00
James Newton-King d49fbe40d5
Update Newtonsoft.Json to 13.0.3 (#2219) 2023-08-10 08:31:45 +08:00
James Newton-King 4367702140
Update Grpc.Net.Client to remove ValueTask usage (#2222) 2023-08-10 07:43:31 +08:00
James Newton-King d305ee4bc6
Improve BalancerAttributes debugging (#2235) 2023-08-07 21:08:50 +08:00
James Newton-King 19e059f073
Support infinite idle connection timeout values (#2231) 2023-08-06 22:04:44 +08:00
James Newton-King cec98b28d5
Validate Windows version when using WinHttpHandler (#2229) 2023-08-04 16:59:10 +08:00
Jan Tattermusch 6420a8cf9f
Start 2.57.x development cycle (#2227)
* Update version.props

* Update VersionInfo.cs
2023-08-04 10:10:34 +02:00
Stephen Toub 6a4bca703a
Add net462 build to Grpc.Net.Client with WinHttpHandler default (#2220) 2023-08-02 10:53:02 +08:00
James Newton-King a2d005c86b
Correctly check socket on stream creation (#2215) 2023-08-02 09:34:21 +08:00
James Newton-King 1d1234064c
Support idle connection timeout with pending sockets (#2213) 2023-07-28 22:43:23 +08:00
James Newton-King 0ab3ada34a
Fix gRPC client retry deadlock (#2209) 2023-07-26 14:35:41 +08:00
James Newton-King bff852c7f1
Improve gRPC channel and client debugging (#2196) 2023-07-25 08:37:57 +08:00
James Newton-King e0677497de
Update SocketConnectivitySubchannelTransport.cs (#2202) 2023-07-25 08:19:29 +08:00
James Newton-King 03d9b01fbb
Socket transport: Don't close socket on available data (#2179) 2023-07-21 09:26:03 +08:00
Theodore Tsirpanis 6307ca7ead
Remove System.Memory dependency on .NET Standard 2.1 in Grpc.Core.Api. (#2186)
Co-authored-by: James Newton-King <james@newtonking.com>
2023-07-20 15:45:53 +08:00
dependabot[bot] 8275c602a9
Bump semver from 6.3.0 to 6.3.1 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2189)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 09:36:15 +08:00
dependabot[bot] 1e32a39efa
Bump tough-cookie from 4.0.0 to 4.1.3 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2187)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 08:45:44 +08:00
dependabot[bot] 5751c4dd3e
Bump word-wrap from 1.2.3 to 1.2.4 in /examples/Spar/Server/ClientApp (#2198)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 08:28:04 +08:00
dependabot[bot] 067bfc8fd8
Bump word-wrap from 1.2.3 to 1.2.4 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2199)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-20 08:27:58 +08:00
James Newton-King d884b50a27
Even better gRPC debugging (#2193) 2023-07-17 18:12:00 +08:00
James Newton-King 85f34398df
Improve grpc-dotnet debugging (#2192) 2023-07-16 20:34:41 +08:00
Jan Tattermusch 16e01b9369
Start 2.56.x development cycle (on master branch) (#2185)
* Update version.props

* Update VersionInfo.cs

* Update dependencies.props
2023-06-30 17:11:08 +02:00
Varorbc 42cc09eb8f
update readme (#2183) 2023-06-28 20:35:35 +08:00
Jan Tattermusch 83d12ea1cb
Update version to 2.55.0-dev (on master branch) (#2177)
* Update version.props

* Update VersionInfo.cs
2023-06-23 14:28:22 +02:00
apolcyn 99604e5a9a
Merge pull request #2175 from apolcyn/revert
Revert "update 2.55 branch to 2.55-pre1"
2023-06-22 17:04:07 -07:00
Alexander Polcyn bc6da06036 Revert "update 2.55 branch to 2.55-pre1"
This reverts commit 266be407f6.
2023-06-22 23:35:39 +00:00
apolcyn 5a2887497e
Merge pull request #2174 from apolcyn/update_255
Update 2.55 branch to 2.55-pre1
2023-06-22 16:34:47 -07:00
Alexander Polcyn 266be407f6 update 2.55 branch to 2.55-pre1 2023-06-22 16:42:01 +00:00
apolcyn c72ada62e6
Update Grpc.Tools to 2.55 (#2171)
Co-authored-by: James Newton-King <james@newtonking.com>
2023-06-22 15:12:31 +08:00
James Newton-King 2be676ad3b
WriteAsync cancellation throws an error with the calls completed status if possible (#2170) 2023-06-22 15:12:17 +08:00
James Newton-King 73c726bf4e
Fix client factory extension method validation issues (#2159) 2023-06-14 19:52:18 +08:00
James Newton-King 697f3492f2
Refactor healthchecks service mapping to support filtering on check (#2142) 2023-06-14 13:11:42 +08:00
James Newton-King ff1a07b90c
Update Google.Protobuf to 3.23.1 (#2136) 2023-06-01 09:24:58 +08:00
James Newton-King 6bc44e97d7
Fix flaky streaming test (#2134) 2023-05-25 11:36:22 +08:00
James Newton-King f9a00bc490
Fix capturing ExecutionContext by timers and background tasks (#2129) 2023-05-17 10:27:38 +08:00
James Newton-King 2dc971e013
Add IReadOnlyDictionary to BalancerAttributes collection (#2121) 2023-05-17 07:17:35 +08:00
apolcyn 1412c31924
Merge pull request #2127 from JamesNK/jamesnk/grpctools-2.54.0
Update Grpc.Tools to 2.54.0
2023-05-16 08:41:46 -07:00
James Newton-King a95f0f08e9
Update Grpc.Tools to 2.54.0 2023-05-16 11:01:03 +08:00
James Newton-King 7786079da6
Fix bugs related to channel dispose while there are active calls (#2120) 2023-05-16 06:00:55 +08:00
James Newton-King 38738af700
Fix missing port from DnsResolver host override value (#2111) 2023-05-05 21:53:03 +08:00
James Newton-King 9427a740a4
Remove host override from container sample (#2109) 2023-05-02 13:26:36 +08:00
James Newton-King b83aece3cf
Make CancellationToken available in call credentials interceptor (#2107) 2023-05-02 06:28:29 +08:00
James Newton-King 8af472314e
Add remove method to balancer attributes collection (#2110) 2023-05-02 06:27:59 +08:00
James Newton-King 94a8167500
Change some gRPC client error logs to debug level (#2106) 2023-04-29 09:11:08 +08:00
Marc Gravell e270f816b4
Enable nullable throughout solution (#2102) 2023-04-27 20:42:51 +08:00
Jan Tattermusch 6bf44820a2
Update version to 2.54.0-dev (on master branch) (#2096)
* Update version.props

* Update VersionInfo.cs
2023-04-12 11:18:04 +02:00
Jan Tattermusch 0998624ce9
Update dependencies.props (#2094) 2023-04-12 10:37:33 +02:00
James Newton-King 54d7f29913
Change proxy detection to log a message (#2087) 2023-04-06 11:29:09 +08:00
James Newton-King b82c0c7354
Fix unobserved exception when using a client interceptor (#2082) 2023-03-22 15:34:37 +08:00
dependabot[bot] fb315ca62b
Bump webpack from 5.75.0 to 5.76.0 in /examples/Browser/Server/wwwroot (#2073)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 21:38:22 +08:00
James Newton-King c24dfebe22
Fix .NET 6 trimming constraint constructor (#2080) 2023-03-21 20:48:05 +08:00
James Newton-King 95cf7fc928
Improve error message with invalid headers (#2068) 2023-03-09 18:11:40 +08:00
Jan Tattermusch f056e80af0
Bump version to 2.53.0-dev (on master) (#2067)
* Update version.props

* Update VersionInfo.cs
2023-03-06 08:54:57 +01:00
Jan Tattermusch 23cd81fbdb
Update version to 2.52.0-dev on master (#2063)
* update version to 2.52.0-dev on master

* Update VersionInfo.cs

* Update dependencies.props
2023-03-02 14:50:11 +01:00
James Newton-King cfb839bd7c
Refactor gRPC content-type constraint to be inline (#2065)
* Refactor gRPC content-type constraint to be inline

* Fix tests

* Clean up

* Comment

* Comment
2023-03-02 12:50:26 +01:00
James Newton-King c2274eb07d
Add .editorconfig and fix warnings (#2055) 2023-02-25 21:43:59 +08:00
James Newton-King a456d47405
Wrap EventSource calls with IsEnabled (#2052) 2023-02-21 19:02:16 +08:00
James Newton-King 84718236a9
Update Google.Protobuf version (#2051) 2023-02-21 18:46:26 +08:00
James Newton-King 0b365bf463
Add additional connection and request logging to client (#2047) 2023-02-13 22:17:58 +08:00
dependabot[bot] 0f9300c439
Bump @sideway/formula from 3.0.0 to 3.0.1 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2045)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 10:16:00 +08:00
James Newton-King ad54bc69ed
Add test that uses localization (#2039) 2023-02-06 11:12:54 +08:00
Pavel Voronin fc4d087d63
Mention Metadata.BinaryHeaderSuffix in xmldoc comments of Metadata.En… (#2027)
Co-authored-by: James Newton-King <james@newtonking.com>
2023-02-05 12:01:14 +08:00
James Newton-King 674758e4d3
Fix gRPC perf client counter (#2035) 2023-02-03 06:38:56 +08:00
James Newton-King 2cdbf1c308
Fix reporting RpcException from server streaming error (#2034) 2023-02-02 07:02:32 +08:00
James Newton-King 4bf9312123
Trimming issue workaround in .NET 8 (#2022) 2023-01-20 08:34:44 +08:00
James Newton-King 0a26b0cad6
Report user canceled cancellation token (#2018)
Co-authored-by: Brennan <brecon@microsoft.com>
2023-01-18 11:01:31 +08:00
James Newton-King b81a92d17b
Don't warn about Android native handler with grpc-web (#2020) 2023-01-18 09:01:41 +08:00
James Newton-King 4c07771aea
Update microsoft-support.md (#2009) 2023-01-18 06:45:04 +08:00
James Newton-King 948be08b08
Fix wrong namespace (#2015) 2023-01-11 20:15:12 +08:00
James Newton-King 96ea3836b4
Support zero-byte read in gRPC client (#1985) 2023-01-11 10:35:00 +08:00
James Newton-King 33f6ae36c9
Set WaitForDataBeforeAllocatingBuffer to false in benchmark app (#2012) 2023-01-09 07:42:50 +08:00
James Newton-King b92eb109f1
Add host override to resolvers (#2002) 2023-01-06 08:14:57 +08:00
James Newton-King f7e186f18e
Support running health checks in Check method (#1987) 2023-01-06 07:44:21 +08:00
James Newton-King 2ea8177bc8
Fix reconnecting after connection timeout (#1998) 2023-01-05 07:08:04 +08:00
James Newton-King 3a356b3719
Add client factory to client linker test app (#1972) 2023-01-05 07:04:10 +08:00
dependabot[bot] ff89215fbc
Bump json5 from 1.0.1 to 1.0.2 in /examples/Spar/Server/ClientApp (#2007)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 09:41:27 +08:00
dependabot[bot] 9ab0b4508f
Bump json5 from 2.2.0 to 2.2.3 in /testassets/InteropTestsGrpcWebWebsite/Tests (#2005)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 09:41:19 +08:00
dependabot[bot] d2c8146302
Bump json5, webpack and webpack-cli in /examples/Browser/Server/wwwroot (#2003)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-04 09:32:44 +08:00
Jan Tattermusch d2c5a7a5b9
Additional dependency version cleanup (after moving some nuget packages to from grpc to grpc-dotnet) (#1786) 2023-01-04 09:21:59 +08:00
James Newton-King 8474b75b41
Support writing to response stream with gRPC-Web middleware (#1993) 2022-12-21 07:03:54 +08:00
Jan Tattermusch d4704d8f44
RpcException API improvements (#1992)
* RpcException: include status.DebugException as InnerException

* make Status.ToString() less verbose

* add tests

* Apply suggestions from code review

Co-authored-by: James Newton-King <james@newtonking.com>

Co-authored-by: James Newton-King <james@newtonking.com>
2022-12-20 19:44:26 +01:00
James Newton-King 11e7cfa3da
Update MAINTAINERS.md (#1979) 2022-12-15 10:54:33 +01:00
James Newton-King 1a9cf64a72
Cancel pending state change watchers on dispose (#1986) 2022-12-13 09:58:44 +08:00
James Newton-King 5a0b1eec01
Skip active connections when proxy is configured (#1863) 2022-12-08 16:23:24 +08:00
James Newton-King 17ef8fdbe5
Make ChannelCredentials.Create work with allowing insecure credentials (#1802) 2022-12-08 11:01:49 +08:00
dependabot[bot] cb88ac90ca
Bump decode-uri-component from 0.2.0 to 0.2.2 in /examples/Browser/Server/wwwroot (#1976)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 11:01:12 +08:00
dependabot[bot] c72d1a82a5
Bump decode-uri-component from 0.2.0 to 0.2.2 in /examples/Spar/Server/ClientApp (#1977)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 11:00:55 +08:00
James Newton-King 3ae11a4cef
Add logging to resolve to indicate resolve is complete (#1978) 2022-12-08 10:11:43 +08:00
James Newton-King a98c6218e0
Update dotnet-grpc tool to require .NET 6 (#1932) 2022-12-08 07:53:01 +08:00
Jan Tattermusch 664f5559f6
Update version to 2.51.0-dev (on master branch) (#1973)
* update version to 2.51.0-dev

* Update VersionInfo.cs

* Update Grpc.Tools dependency version
2022-12-07 15:54:35 +01:00
Felix Winterhalter e28a43ffed
fix: Fixes missing constructor in trimmed builds (#1970)
Closes https://github.com/grpc/grpc-dotnet/issues/1969
2022-12-07 10:07:22 +08:00
dependabot[bot] bb406e8bfa
Bump minimatch from 3.0.4 to 3.1.2 in /examples/Browser/Server/wwwroot (#1958)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-23 21:08:34 +08:00
dependabot[bot] 80e2fabcf9
Bump loader-utils and webpack-cli in /examples/Browser/Server/wwwroot (#1957)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 10:20:22 +08:00
James Newton-King 23047e0d49
Change channel transport property to readonly (#1947) 2022-11-16 15:10:09 +08:00
James Newton-King 91ac7754f2
Update to GA .NET 7 SDK (#1943) 2022-11-11 22:15:34 +08:00
James Newton-King faf6234b3d
Add .NET 8 feed to sources (#1940) 2022-11-10 09:39:32 +08:00
Jan Tattermusch 25f7b137d7
Revert "Update version to 2.50.0-pre1 (on v2.50.x branch) (#1935)" (#1936)
This reverts commit 0828c036bb.
2022-11-03 09:07:43 +01:00
James Newton-King 97b7f6d4d7
Improve logging message when gRPC status OK in header (#1931) 2022-11-03 09:29:52 +08:00
Jan Tattermusch 0828c036bb
Update version to 2.50.0-pre1 (on v2.50.x branch) (#1935)
* Update version to 2.50.0-pre1 (on v2.50.x branch)

* Update VersionInfo.cs
2022-11-02 15:43:25 +01:00
Jan Tattermusch 6c48114e67
Update Grpc.Tools dependency to 2.50.0 (#1934) 2022-11-02 10:01:28 +01:00
James Newton-King 7154cb470d
Detect native HttpHandler on Android (#1927) 2022-11-01 16:43:11 +08:00
James Newton-King 4c2e66ed85
Enable AOT analysis and fix warnings (#1924) 2022-10-25 06:12:30 +08:00
James Newton-King 45dd5d171c
Fix build failure on benchmark server V2 (#1920) 2022-10-19 06:15:18 +08:00
James Newton-King 947a24aefe
Upgrade dotnet-grpc dependencies (#1914) 2022-10-18 08:57:10 +08:00
James Newton-King 22ac73b110
Fix build failure on benchmark server (#1913) 2022-10-17 13:09:24 +08:00
dependabot[bot] e7fd8004c0
Bump minimist, minimist and mkdirp in /examples/Browser/Server/wwwroot (#1910)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 04:07:42 +08:00
dependabot[bot] e86adbf656
Bump ansi-regex from 3.0.0 to 3.0.1 in /examples/Spar/Server/ClientApp (#1911)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 04:07:30 +08:00
dependabot[bot] 3617dc1c78
Bump ansi-regex from 4.1.0 to 4.1.1 in /examples/Browser/Server/wwwroot (#1909)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 04:07:20 +08:00
James Newton-King cb02fb7e8f
Update transcoder example (#1887) 2022-10-12 03:51:08 +08:00
Brennan ad67dc8d27
Fix grpc benchmark cancellation (#1901) 2022-10-06 07:27:29 +08:00
James Newton-King 456098bcfe
Update Grpc.DotNet.sln to use file scoped namespaces (#1894) 2022-10-05 22:17:09 +08:00
Eduard Llull 371d74fc95
Use the extending class name when throwing ObjectDisposedException (#1890) 2022-09-26 21:50:07 +08:00
Jan Tattermusch 0f5c5782e3
Update Grpc.Core and Grpc.Tools dependencies. (#1892) 2022-09-26 12:26:10 +02:00
James Newton-King 0ab5e2c509
Change examples to use WebApplication V3 (#1878) 2022-09-17 10:28:31 +08:00
James Newton-King 9950fd717b
Fix race condition in flaky test (#1883) 2022-09-14 08:49:46 +08:00
James Newton-King 9852674a88
Fix detecting message accept encoding with whitespace (#1882) 2022-09-14 08:39:39 +08:00
James Newton-King 54fa142547
Change examples to use WebApplication V4 (#1879) 2022-09-13 12:41:50 +08:00
James Newton-King 195e1c0922
Change examples to use WebApplication V2 (#1877) 2022-09-13 12:07:07 +08:00
James Newton-King 7980069be0
Change examples to use WebApplication V1 (#1875) 2022-09-13 10:29:46 +08:00
James Newton-King 884d918e3c
Improve transcoder example with swagger (#1871) 2022-09-05 14:15:27 +08:00
James Newton-King 792eb3b570
Fix using disposed token in connect and resulting status (#1872) 2022-09-01 21:34:21 +08:00
Jan Tattermusch 8ae9c96c18
Update the version to v2.50.0-dev (on master branch) (#1867)
* Update version.props

* Update VersionInfo.cs
2022-09-01 15:25:30 +02:00
James Newton-King 937869c130
Log sync errors in client logger interceptor example (#1868) 2022-08-31 09:39:53 +08:00
1051 changed files with 82093 additions and 119249 deletions

406
.editorconfig Normal file
View File

@ -0,0 +1,406 @@
; EditorConfig to support per-solution formatting.
; Use the EditorConfig VS add-in to make this work.
; http://editorconfig.org/
;
; Here are some resources for what's supported for .NET/C#
; https://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
; https://learn.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
;
; Be **careful** editing this because some of the rules don't support adding a severity level
; For instance if you change to `dotnet_sort_system_directives_first = true:warning` (adding `:warning`)
; then the rule will be silently ignored.
; This is the default for the codeline.
root = true
[*]
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.cs]
indent_size = 4
dotnet_sort_system_directives_first = true
# Don't use this. qualifier
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
# use int x = .. over Int32
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
# use int.MaxValue over Int32.MaxValue
dotnet_style_predefined_type_for_member_access = true:suggestion
# Require var all the time.
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Disallow throw expressions.
csharp_style_throw_expression = false:suggestion
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
# Namespace settings
csharp_style_namespace_declarations = file_scoped
# Brace settings
csharp_prefer_braces = true # Prefer curly braces even for one line of code
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
[*.json]
indent_size = 2
[*.{ps1,psm1}]
indent_size = 4
[*.sh]
indent_size = 4
end_of_line = lf
[*.{razor,cshtml}]
charset = utf-8-bom
[*.{cs,vb}]
# SYSLIB1054: Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
dotnet_diagnostic.SYSLIB1054.severity = warning
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = warning
# CA1047: Do not declare protected member in sealed type
dotnet_diagnostic.CA1047.severity = warning
# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = warning
# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = warning
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = warning
# CA1511: Use ArgumentException throw helper
dotnet_diagnostic.CA1511.severity = warning
# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = warning
# CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = warning
# CA1725: Parameter names should match base declaration
dotnet_diagnostic.CA1725.severity = suggestion
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = warning
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = warning
# CA1810: Do not initialize unnecessarily
dotnet_diagnostic.CA1810.severity = warning
# CA1821: Remove empty Finalizers
dotnet_diagnostic.CA1821.severity = warning
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = warning
dotnet_code_quality.CA1822.api_surface = private, internal
# CA1823: Avoid unused private fields
dotnet_diagnostic.CA1823.severity = warning
# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = warning
# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = warning
# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = warning
# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
dotnet_diagnostic.CA1828.severity = warning
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = warning
# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
dotnet_diagnostic.CA1830.severity = warning
# CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
dotnet_diagnostic.CA1831.severity = warning
dotnet_diagnostic.CA1832.severity = warning
dotnet_diagnostic.CA1833.severity = warning
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = warning
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = warning
# CA1836: Prefer IsEmpty over Count
dotnet_diagnostic.CA1836.severity = warning
# CA1837: Use 'Environment.ProcessId'
dotnet_diagnostic.CA1837.severity = warning
# CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = warning
# CA1839: Use 'Environment.ProcessPath'
dotnet_diagnostic.CA1839.severity = warning
# CA1840: Use 'Environment.CurrentManagedThreadId'
dotnet_diagnostic.CA1840.severity = warning
# CA1841: Prefer Dictionary.Contains methods
dotnet_diagnostic.CA1841.severity = warning
# CA1842: Do not use 'WhenAll' with a single task
dotnet_diagnostic.CA1842.severity = warning
# CA1843: Do not use 'WaitAll' with a single task
dotnet_diagnostic.CA1843.severity = warning
# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = warning
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = warning
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = warning
# CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1847.severity = warning
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = warning
# CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = warning
# CA1855: Prefer 'Clear' over 'Fill'
dotnet_diagnostic.CA1855.severity = warning
# CA1856: Incorrect usage of ConstantExpected attribute
dotnet_diagnostic.CA1856.severity = error
# CA1857: A constant is expected for the parameter
dotnet_diagnostic.CA1857.severity = warning
# CA1858: Use 'StartsWith' instead of 'IndexOf'
dotnet_diagnostic.CA1858.severity = warning
# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = warning
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = warning
# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
dotnet_diagnostic.CA2009.severity = warning
# CA2011: Avoid infinite recursion
dotnet_diagnostic.CA2011.severity = warning
# CA2012: Use ValueTask correctly
dotnet_diagnostic.CA2012.severity = warning
# CA2013: Do not use ReferenceEquals with value types
dotnet_diagnostic.CA2013.severity = warning
# CA2014: Do not use stackalloc in loops.
dotnet_diagnostic.CA2014.severity = warning
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = warning
# CA2200: Rethrow to preserve stack details
dotnet_diagnostic.CA2200.severity = warning
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = warning
# CA2245: Do not assign a property to itself
dotnet_diagnostic.CA2245.severity = warning
# CA2246: Assigning symbol and its member in the same statement
dotnet_diagnostic.CA2246.severity = warning
# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
dotnet_diagnostic.CA2249.severity = warning
# IDE0005: Remove unnecessary usings
dotnet_diagnostic.IDE0005.severity = warning
# IDE0011: Curly braces to surround blocks of code
dotnet_diagnostic.IDE0011.severity = warning
# IDE0020: Use pattern matching to avoid is check followed by a cast (with variable)
dotnet_diagnostic.IDE0020.severity = warning
# IDE0029: Use coalesce expression (non-nullable types)
dotnet_diagnostic.IDE0029.severity = warning
# IDE0030: Use coalesce expression (nullable types)
dotnet_diagnostic.IDE0030.severity = warning
# IDE0031: Use null propagation
dotnet_diagnostic.IDE0031.severity = warning
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# IDE0036: Order modifiers
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
dotnet_diagnostic.IDE0036.severity = warning
# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable)
dotnet_diagnostic.IDE0038.severity = warning
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = warning
# IDE0055: All formatting rules
dotnet_diagnostic.IDE0055.severity = suggestion
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = warning
# IDE0060: Remove unused parameter
dotnet_code_quality_unused_parameters = non_public
dotnet_diagnostic.IDE0060.severity = warning
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = warning
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = warning
# IDE0200: Lambda expression can be removed
dotnet_diagnostic.IDE0200.severity = warning
# IDE2000: Disallow multiple blank lines
dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_diagnostic.IDE2000.severity = warning
[{test,tests,testassets,examples,perf,scripts,stress}/**.cs]
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = suggestion
# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = suggestion
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = suggestion
# CA1511: Use ArgumentException throw helper
dotnet_diagnostic.CA1511.severity = suggestion
# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = suggestion
# CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = suggestion
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = suggestion
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = suggestion
# CA1810: Do not initialize unnecessarily
dotnet_diagnostic.CA1810.severity = suggestion
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = suggestion
# CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = suggestion
# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = suggestion
# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = suggestion
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = suggestion
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = suggestion
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = suggestion
# CA1837: Use 'Environment.ProcessId'
dotnet_diagnostic.CA1837.severity = suggestion
# CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = suggestion
# CA1841: Prefer Dictionary.Contains methods
dotnet_diagnostic.CA1841.severity = suggestion
# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = suggestion
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = suggestion
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = suggestion
# CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1847.severity = suggestion
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = suggestion
# CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = suggestion
# CA1855: Prefer 'Clear' over 'Fill'
dotnet_diagnostic.CA1855.severity = suggestion
# CA1856: Incorrect usage of ConstantExpected attribute
dotnet_diagnostic.CA1856.severity = suggestion
# CA1857: A constant is expected for the parameter
dotnet_diagnostic.CA1857.severity = suggestion
# CA1858: Use 'StartsWith' instead of 'IndexOf'
dotnet_diagnostic.CA1858.severity = suggestion
# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = suggestion
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = suggestion
# CA2012: Use ValueTask correctly
dotnet_diagnostic.CA2012.severity = suggestion
# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
dotnet_diagnostic.CA2249.severity = suggestion
# IDE0005: Remove unnecessary usings
dotnet_diagnostic.IDE0005.severity = suggestion
# IDE0020: Use pattern matching to avoid is check followed by a cast (with variable)
dotnet_diagnostic.IDE0020.severity = suggestion
# IDE0029: Use coalesce expression (non-nullable types)
dotnet_diagnostic.IDE0029.severity = suggestion
# IDE0030: Use coalesce expression (nullable types)
dotnet_diagnostic.IDE0030.severity = suggestion
# IDE0031: Use null propagation
dotnet_diagnostic.IDE0031.severity = suggestion
# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable)
dotnet_diagnostic.IDE0038.severity = suggestion
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = suggestion
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = suggestion
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = suggestion
# IDE0060: Remove unused parameters
dotnet_diagnostic.IDE0060.severity = suggestion
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = suggestion
# IDE0200: Lambda expression can be removed
dotnet_diagnostic.IDE0200.severity = suggestion
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = suggestion

View File

@ -15,25 +15,32 @@ jobs:
build:
name: Basic Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install dotnet
run: ./build/get-dotnet.sh
- name: Build and run tests
run: ./build_and_test.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: artifacts
path: artifacts
if-no-files-found: error
grpc_web:
name: gRPC-Web Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run interop tests
run: ./grpcweb_interoptests.sh

1
.gitignore vendored
View File

@ -34,7 +34,6 @@ launchSettings.json
BenchmarkDotNet.Artifacts/
BDN.Generated/
binaries/
global.json
.vscode/
*.binlog
build/feed

View File

@ -1,6 +1,4 @@
<Project>
<Import Project="build\sources.props" />
<Import Project="build\dependencies.props" />
<Import Project="build\version.props" />
<PropertyGroup>
@ -18,14 +16,17 @@
<!-- Don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
<!-- Ignore warning about lowercase identifiers. Caused by generated source from Protobuf. -->
<!-- TODO(JamesNK): Remove when Protobuf is updated and samples use a version of Grpc.AspNetCore that brings in Grpc.Tools 2.49.0 or later. -->
<NoWarn>$(NoWarn);CS8981</NoWarn>
<!-- Disable warnings about AOT and trimming features on older targets, e.g. netstandard2.0.
For now, continue to apply these features to these targets because some packages don't have a target that supports them -->
<NoWarn>$(NoWarn);NETSDK1195;NETSDK1210</NoWarn>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<LangVersion>11.0</LangVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Some packages generate warnings when used on TFMs that are out of support (or almost out of support) -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
</Project>

View File

@ -19,14 +19,36 @@
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)Grpc.DotNet.ruleset</CodeAnalysisRuleset>
<IsTrimmable>true</IsTrimmable>
<EnableAOTAnalyzer>true</EnableAOTAnalyzer>
</PropertyGroup>
<!-- IsGrpcPublishedPackage is set in csproj so related config must be in targets file -->
<ItemGroup Condition="'$(IsGrpcPublishedPackage)' == 'true'">
<None Include="$(PackageIconFullPath)" Pack="true" PackagePath="\"/>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="$(MicrosoftCodeAnalysisNetAnalyzersPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
<Using Include="NUnit.Framework.Legacy" />
<Using Include="NUnit.Framework" />
</ItemGroup>
<!--
Make a netstandard2.1 copy of the .net ILLinkPack to work around a trimming issue.
See https://github.com/dotnet/linker/issues/3175
TODO: Remove once .NET 8 + trimming + netstandard2.1 is fixed.
-->
<Target Name="_FixKnownILLinkPack"
BeforeTargets="ProcessFrameworkReferences">
<ItemGroup>
<KnownILLinkPack Include="@(KnownILLinkPack)"
Condition="'%(TargetFramework)' == 'net8.0'"
TargetFramework="netstandard2.1"
ILLinkPackVersion="%(KnownILLinkPack.ILLinkPackVersion)" />
</ItemGroup>
</Target>
</Project>

89
Directory.Packages.props Normal file
View File

@ -0,0 +1,89 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<MicrosoftAspNetCoreAppPackageVersion>9.0.4</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftAspNetCoreApp8PackageVersion>8.0.15</MicrosoftAspNetCoreApp8PackageVersion>
<MicrosoftAspNetCoreApp7PackageVersion>7.0.20</MicrosoftAspNetCoreApp7PackageVersion>
<MicrosoftAspNetCoreApp6PackageVersion>6.0.36</MicrosoftAspNetCoreApp6PackageVersion>
<GrpcDotNetPackageVersion>2.70.0</GrpcDotNetPackageVersion>
<OpenTelemetryPackageVersion>1.6.0</OpenTelemetryPackageVersion>
<OpenTelemetryIntergationPackageVersion>1.8.1</OpenTelemetryIntergationPackageVersion>
<OpenTelemetryGrpcPackageVersion>1.8.0-beta.1</OpenTelemetryGrpcPackageVersion>
<MicrosoftExtensionsPackageVersion>9.0.0</MicrosoftExtensionsPackageVersion>
<MicrosoftExtensionsLtsPackageVersion>6.0.0</MicrosoftExtensionsLtsPackageVersion>
</PropertyGroup>
<ItemGroup>
<!-- ASP.NET Core -->
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Certificate" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Grpc.JsonTranscoding" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Grpc.Swagger" Version="0.8.0" />
<!-- Extensions -->
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsPackageVersion)" />
<!-- gRPC -->
<PackageVersion Include="Grpc.Tools" Version="2.71.0" />
<PackageVersion Include="Grpc.Core" Version="2.46.6" />
<PackageVersion Include="Grpc.Core.Api" Version="$(GrpcDotNetPackageVersion)"/>
<PackageVersion Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.Net.Client.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.Net.ClientFactory" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.AspNetCore.Server" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.AspNetCore.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.Reflection" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.AspNetCore.Server.Reflection" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.HealthCheck" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.AspNetCore.HealthChecks" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.Auth" Version="$(GrpcDotNetPackageVersion)" />
<PackageVersion Include="Grpc.StatusProto" Version="$(GrpcDotNetPackageVersion)" />
<!-- OpenTelemetry -->
<PackageVersion Include="OpenTelemetry" Version="$(OpenTelemetryPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="$(OpenTelemetryPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="$(OpenTelemetryPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="$(OpenTelemetryIntergationPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="$(OpenTelemetryGrpcPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="$(OpenTelemetryIntergationPackageVersion)" />
<!-- Other -->
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="CommandLineParser" Version="2.5.0" />
<PackageVersion Include="Google.Api.CommonProtos" Version="2.16.0" />
<PackageVersion Include="Google.Apis.Auth" Version="1.69.0" />
<PackageVersion Include="Google.Protobuf" Version="3.30.2" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageVersion Include="Microsoft.Build" Version="17.3.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" />
<PackageVersion Include="Microsoft.Crank.EventSources" Version="0.2.0-alpha.21255.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="4.6.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Nunit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.0.140" />
<PackageVersion Include="protobuf-net.Grpc" Version="1.0.140" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.CommandLine.Rendering" Version="0.4.0-alpha.22272.1" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
<PackageVersion Include="System.Memory" Version="4.5.3" />
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="8.0.0" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageVersion Include="System.Text.Json" Version="6.0.10" />
<PackageVersion Include="System.Threading.Channels" Version="4.6.0" />
</ItemGroup>
</Project>

View File

@ -1,362 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32203.90
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8C62055F-8CD7-4859-9001-634D544DF2AE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CECC4AE8-9C4E-4727-939B-517CC2E58D65}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Server", "src\Grpc.AspNetCore.Server\Grpc.AspNetCore.Server.csproj", "{89ED416F-92F1-4425-9379-D4E76A285860}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Server.Tests", "test\Grpc.AspNetCore.Server.Tests\Grpc.AspNetCore.Server.Tests.csproj", "{278B1311-41BF-4345-947E-7B70E277FC3C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.FunctionalTests", "test\FunctionalTests\Grpc.AspNetCore.FunctionalTests.csproj", "{B190F61D-854C-4EE1-9532-B81AB3215F90}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "perf", "perf", "{4163E1B3-4D75-46B4-9107-9A158FD708FC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{59C7B1F0-EE4D-4098-8596-0ADDBC305234}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Proto", "Proto", "{BF1393D4-6099-4EF9-85BB-7EE6CBEB920C}"
ProjectSection(SolutionItems) = preProject
testassets\Proto\any.proto = testassets\Proto\any.proto
testassets\Proto\authorize.proto = testassets\Proto\authorize.proto
testassets\Proto\chat.proto = testassets\Proto\chat.proto
testassets\Proto\compression.proto = testassets\Proto\compression.proto
testassets\Proto\count.proto = testassets\Proto\count.proto
testassets\Proto\greet.proto = testassets\Proto\greet.proto
testassets\Proto\lifetime.proto = testassets\Proto\lifetime.proto
testassets\Proto\nested.proto = testassets\Proto\nested.proto
examples\Proto\race.proto = examples\Proto\race.proto
testassets\Proto\singleton.proto = testassets\Proto\singleton.proto
testassets\Proto\streaming.proto = testassets\Proto\streaming.proto
testassets\Proto\unimplemented.proto = testassets\Proto\unimplemented.proto
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTestsWebsite", "testassets\FunctionalTestsWebsite\FunctionalTestsWebsite.csproj", "{7B95289B-4992-4C0D-B26F-8EC58F81FC96}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarkapps", "benchmarkapps", "{1B8B6117-CE39-4580-BAFA-D8026102767A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{310E5783-455A-4D09-A7AE-39DC2AB09504}"
ProjectSection(SolutionItems) = preProject
perf\benchmarkapps\Shared\BenchmarkConfigurationHelpers.cs = perf\benchmarkapps\Shared\BenchmarkConfigurationHelpers.cs
perf\benchmarkapps\Shared\BenchmarkServiceImpl.cs = perf\benchmarkapps\Shared\BenchmarkServiceImpl.cs
perf\benchmarkapps\Shared\benchmark_service.proto = perf\benchmarkapps\Shared\benchmark_service.proto
perf\benchmarkapps\Shared\messages.proto = perf\benchmarkapps\Shared\messages.proto
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Microbenchmarks", "perf\Grpc.AspNetCore.Microbenchmarks\Grpc.AspNetCore.Microbenchmarks.csproj", "{98500D54-FC3F-4A42-B74D-51930C19B175}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropTestsWebsite", "testassets\InteropTestsWebsite\InteropTestsWebsite.csproj", "{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkWorkerWebsite", "testassets\BenchmarkWorkerWebsite\BenchmarkWorkerWebsite.csproj", "{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Certs", "Certs", "{39320CA8-D8F0-45B6-B704-A04C16870226}"
ProjectSection(SolutionItems) = preProject
perf\benchmarkapps\Shared\Certs\testCert.pfx = perf\benchmarkapps\Shared\Certs\testCert.pfx
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Server.Reflection", "src\Grpc.AspNetCore.Server.Reflection\Grpc.AspNetCore.Server.Reflection.csproj", "{55813F20-1269-4B19-B03E-7E4A90148F92}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropTestsClient", "testassets\InteropTestsClient\InteropTestsClient.csproj", "{291E5BA5-608D-406D-A2DB-389412D907F3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Certs", "Certs", "{743F8EC2-004E-4640-B04F-5BAFDA8BF112}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "InteropTests", "InteropTests", "{50CF39FF-2644-4B5F-BE1A-B57487B9723B}"
ProjectSection(SolutionItems) = preProject
testassets\Certs\InteropTests\ca.pem = testassets\Certs\InteropTests\ca.pem
testassets\Certs\InteropTests\README.md = testassets\Certs\InteropTests\README.md
testassets\Certs\InteropTests\server1.key = testassets\Certs\InteropTests\server1.key
testassets\Certs\InteropTests\server1.pem = testassets\Certs\InteropTests\server1.pem
testassets\Certs\InteropTests\server1.pfx = testassets\Certs\InteropTests\server1.pfx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grpc", "grpc", "{6DC078D2-8FB1-4685-B9BE-61F1C0ED8053}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testing", "testing", "{88AC787E-603C-48C3-AEBA-D90F3E2142CA}"
ProjectSection(SolutionItems) = preProject
testassets\Proto\grpc\testing\empty.proto = testassets\Proto\grpc\testing\empty.proto
testassets\Proto\grpc\testing\messages.proto = testassets\Proto\grpc\testing\messages.proto
testassets\Proto\grpc\testing\test.proto = testassets\Proto\grpc\testing\test.proto
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropTestsNativeServer", "testassets\InteropTestsNativeServer\InteropTestsNativeServer.csproj", "{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-grpc", "src\dotnet-grpc\dotnet-grpc.csproj", "{EBD5D978-1519-45ED-AC20-EC43C7FA552C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-grpc.Tests", "test\dotnet-grpc.Tests\dotnet-grpc.Tests.csproj", "{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Server.ClientFactory", "src\Grpc.AspNetCore.Server.ClientFactory\Grpc.AspNetCore.Server.ClientFactory.csproj", "{BF9F5674-2BC3-446E-BBEA-3055A4A2B889}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Server.ClientFactory.Tests", "test\Grpc.AspNetCore.Server.ClientFactory.Tests\Grpc.AspNetCore.Server.ClientFactory.Tests.csproj", "{4306E048-9D81-44A8-8069-2C294289FC00}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.Client", "src\Grpc.Net.Client\Grpc.Net.Client.csproj", "{095F2B46-16DC-4A2E-A075-A0373D902294}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.Client.Tests", "test\Grpc.Net.Client.Tests\Grpc.Net.Client.Tests.csproj", "{7C299E2C-A5FE-439D-A346-2A676302BD04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.ClientFactory", "src\Grpc.Net.ClientFactory\Grpc.Net.ClientFactory.csproj", "{F68DBD76-196A-4F55-BBEB-97278655017F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.ClientFactory.Tests", "test\Grpc.Net.ClientFactory.Tests\Grpc.Net.ClientFactory.Tests.csproj", "{0C98BD64-8A57-46A1-B47B-EAF260DEE25A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore", "src\Grpc.AspNetCore\Grpc.AspNetCore.csproj", "{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.Common", "src\Grpc.Net.Common\Grpc.Net.Common.csproj", "{69C50655-71EE-4E69-BC2C-ABCA568F6E76}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GrpcAspNetCoreServer", "perf\benchmarkapps\GrpcAspNetCoreServer\GrpcAspNetCoreServer.csproj", "{1D9AB69D-244C-4871-867E-DCEC52B552A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GrpcCoreServer", "perf\benchmarkapps\GrpcCoreServer\GrpcCoreServer.csproj", "{781111FC-8F3C-433E-BC96-D88ADAEE3064}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.Client.Web", "src\Grpc.Net.Client.Web\Grpc.Net.Client.Web.csproj", "{429EB088-94FF-4F06-8E54-72157089C8C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.Web", "src\Grpc.AspNetCore.Web\Grpc.AspNetCore.Web.csproj", "{778DB6EE-E5B2-4875-A209-40010B5A3E21}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.AspNetCore.HealthChecks", "src\Grpc.AspNetCore.HealthChecks\Grpc.AspNetCore.HealthChecks.csproj", "{39A9F2B5-2541-423E-83C9-46C7BFF53F41}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropTestsGrpcWebWebsite", "testassets\InteropTestsGrpcWebWebsite\InteropTestsGrpcWebWebsite.csproj", "{AE2CF906-6C98-40F5-8EE5-3DBAC572F114}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InteropTestsGrpcWebClient", "testassets\InteropTestsGrpcWebClient\InteropTestsGrpcWebClient.csproj", "{10DD7EEB-7B3A-4BF2-9562-78831FB06001}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GrpcClient", "perf\benchmarkapps\GrpcClient\GrpcClient.csproj", "{D241B525-3B50-42EA-9E43-052745549BA6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinkerTestsClient", "testassets\LinkerTestsClient\LinkerTestsClient.csproj", "{1FA0B07B-E65C-4380-94A4-75F10312487D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LinkerTestsWebsite", "testassets\LinkerTestsWebsite\LinkerTestsWebsite.csproj", "{FC5F9350-B812-4C62-AE76-0FF437F0F362}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Net.Client.Web.Tests", "test\Grpc.Net.Client.Web.Tests\Grpc.Net.Client.Web.Tests.csproj", "{14B1CA94-1222-4D2E-B37A-1FF8676E233E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QpsWorker", "perf\benchmarkapps\QpsWorker\QpsWorker.csproj", "{430F312C-550B-4D1F-907F-01A72F3E5CF2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Core.Api", "src\Grpc.Core.Api\Grpc.Core.Api.csproj", "{BAE7C213-5950-4916-B456-A482828D89A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Core.Api.Tests", "test\Grpc.Core.Api.Tests\Grpc.Core.Api.Tests.csproj", "{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Auth", "src\Grpc.Auth\Grpc.Auth.csproj", "{0BF42289-98E1-4490-8934-AF56B05ADB8B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.HealthCheck", "src\Grpc.HealthCheck\Grpc.HealthCheck.csproj", "{6A70E853-DFAF-4484-90FC-ACA755CD02A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Reflection", "src\Grpc.Reflection\Grpc.Reflection.csproj", "{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.HealthCheck.Tests", "test\Grpc.HealthCheck.Tests\Grpc.HealthCheck.Tests.csproj", "{25544326-C145-4D05-A4C3-AC7D59E17196}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grpc.Reflection.Tests", "test\Grpc.Reflection.Tests\Grpc.Reflection.Tests.csproj", "{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{89ED416F-92F1-4425-9379-D4E76A285860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89ED416F-92F1-4425-9379-D4E76A285860}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89ED416F-92F1-4425-9379-D4E76A285860}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89ED416F-92F1-4425-9379-D4E76A285860}.Release|Any CPU.Build.0 = Release|Any CPU
{278B1311-41BF-4345-947E-7B70E277FC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{278B1311-41BF-4345-947E-7B70E277FC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{278B1311-41BF-4345-947E-7B70E277FC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{278B1311-41BF-4345-947E-7B70E277FC3C}.Release|Any CPU.Build.0 = Release|Any CPU
{B190F61D-854C-4EE1-9532-B81AB3215F90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B190F61D-854C-4EE1-9532-B81AB3215F90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B190F61D-854C-4EE1-9532-B81AB3215F90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B190F61D-854C-4EE1-9532-B81AB3215F90}.Release|Any CPU.Build.0 = Release|Any CPU
{7B95289B-4992-4C0D-B26F-8EC58F81FC96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B95289B-4992-4C0D-B26F-8EC58F81FC96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B95289B-4992-4C0D-B26F-8EC58F81FC96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B95289B-4992-4C0D-B26F-8EC58F81FC96}.Release|Any CPU.Build.0 = Release|Any CPU
{98500D54-FC3F-4A42-B74D-51930C19B175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98500D54-FC3F-4A42-B74D-51930C19B175}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98500D54-FC3F-4A42-B74D-51930C19B175}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98500D54-FC3F-4A42-B74D-51930C19B175}.Release|Any CPU.Build.0 = Release|Any CPU
{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A}.Release|Any CPU.Build.0 = Release|Any CPU
{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25}.Release|Any CPU.Build.0 = Release|Any CPU
{55813F20-1269-4B19-B03E-7E4A90148F92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55813F20-1269-4B19-B03E-7E4A90148F92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55813F20-1269-4B19-B03E-7E4A90148F92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55813F20-1269-4B19-B03E-7E4A90148F92}.Release|Any CPU.Build.0 = Release|Any CPU
{291E5BA5-608D-406D-A2DB-389412D907F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{291E5BA5-608D-406D-A2DB-389412D907F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{291E5BA5-608D-406D-A2DB-389412D907F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{291E5BA5-608D-406D-A2DB-389412D907F3}.Release|Any CPU.Build.0 = Release|Any CPU
{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B}.Release|Any CPU.Build.0 = Release|Any CPU
{EBD5D978-1519-45ED-AC20-EC43C7FA552C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBD5D978-1519-45ED-AC20-EC43C7FA552C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBD5D978-1519-45ED-AC20-EC43C7FA552C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBD5D978-1519-45ED-AC20-EC43C7FA552C}.Release|Any CPU.Build.0 = Release|Any CPU
{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8}.Release|Any CPU.Build.0 = Release|Any CPU
{BF9F5674-2BC3-446E-BBEA-3055A4A2B889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF9F5674-2BC3-446E-BBEA-3055A4A2B889}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF9F5674-2BC3-446E-BBEA-3055A4A2B889}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF9F5674-2BC3-446E-BBEA-3055A4A2B889}.Release|Any CPU.Build.0 = Release|Any CPU
{4306E048-9D81-44A8-8069-2C294289FC00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4306E048-9D81-44A8-8069-2C294289FC00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4306E048-9D81-44A8-8069-2C294289FC00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4306E048-9D81-44A8-8069-2C294289FC00}.Release|Any CPU.Build.0 = Release|Any CPU
{095F2B46-16DC-4A2E-A075-A0373D902294}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{095F2B46-16DC-4A2E-A075-A0373D902294}.Debug|Any CPU.Build.0 = Debug|Any CPU
{095F2B46-16DC-4A2E-A075-A0373D902294}.Release|Any CPU.ActiveCfg = Release|Any CPU
{095F2B46-16DC-4A2E-A075-A0373D902294}.Release|Any CPU.Build.0 = Release|Any CPU
{7C299E2C-A5FE-439D-A346-2A676302BD04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C299E2C-A5FE-439D-A346-2A676302BD04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C299E2C-A5FE-439D-A346-2A676302BD04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C299E2C-A5FE-439D-A346-2A676302BD04}.Release|Any CPU.Build.0 = Release|Any CPU
{F68DBD76-196A-4F55-BBEB-97278655017F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F68DBD76-196A-4F55-BBEB-97278655017F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F68DBD76-196A-4F55-BBEB-97278655017F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F68DBD76-196A-4F55-BBEB-97278655017F}.Release|Any CPU.Build.0 = Release|Any CPU
{0C98BD64-8A57-46A1-B47B-EAF260DEE25A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C98BD64-8A57-46A1-B47B-EAF260DEE25A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C98BD64-8A57-46A1-B47B-EAF260DEE25A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C98BD64-8A57-46A1-B47B-EAF260DEE25A}.Release|Any CPU.Build.0 = Release|Any CPU
{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05}.Release|Any CPU.Build.0 = Release|Any CPU
{69C50655-71EE-4E69-BC2C-ABCA568F6E76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69C50655-71EE-4E69-BC2C-ABCA568F6E76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69C50655-71EE-4E69-BC2C-ABCA568F6E76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69C50655-71EE-4E69-BC2C-ABCA568F6E76}.Release|Any CPU.Build.0 = Release|Any CPU
{1D9AB69D-244C-4871-867E-DCEC52B552A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D9AB69D-244C-4871-867E-DCEC52B552A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D9AB69D-244C-4871-867E-DCEC52B552A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D9AB69D-244C-4871-867E-DCEC52B552A4}.Release|Any CPU.Build.0 = Release|Any CPU
{781111FC-8F3C-433E-BC96-D88ADAEE3064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{781111FC-8F3C-433E-BC96-D88ADAEE3064}.Debug|Any CPU.Build.0 = Debug|Any CPU
{781111FC-8F3C-433E-BC96-D88ADAEE3064}.Release|Any CPU.ActiveCfg = Release|Any CPU
{781111FC-8F3C-433E-BC96-D88ADAEE3064}.Release|Any CPU.Build.0 = Release|Any CPU
{429EB088-94FF-4F06-8E54-72157089C8C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{429EB088-94FF-4F06-8E54-72157089C8C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{429EB088-94FF-4F06-8E54-72157089C8C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{429EB088-94FF-4F06-8E54-72157089C8C3}.Release|Any CPU.Build.0 = Release|Any CPU
{778DB6EE-E5B2-4875-A209-40010B5A3E21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{778DB6EE-E5B2-4875-A209-40010B5A3E21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{778DB6EE-E5B2-4875-A209-40010B5A3E21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{778DB6EE-E5B2-4875-A209-40010B5A3E21}.Release|Any CPU.Build.0 = Release|Any CPU
{39A9F2B5-2541-423E-83C9-46C7BFF53F41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39A9F2B5-2541-423E-83C9-46C7BFF53F41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39A9F2B5-2541-423E-83C9-46C7BFF53F41}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39A9F2B5-2541-423E-83C9-46C7BFF53F41}.Release|Any CPU.Build.0 = Release|Any CPU
{AE2CF906-6C98-40F5-8EE5-3DBAC572F114}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE2CF906-6C98-40F5-8EE5-3DBAC572F114}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE2CF906-6C98-40F5-8EE5-3DBAC572F114}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE2CF906-6C98-40F5-8EE5-3DBAC572F114}.Release|Any CPU.Build.0 = Release|Any CPU
{10DD7EEB-7B3A-4BF2-9562-78831FB06001}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10DD7EEB-7B3A-4BF2-9562-78831FB06001}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10DD7EEB-7B3A-4BF2-9562-78831FB06001}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10DD7EEB-7B3A-4BF2-9562-78831FB06001}.Release|Any CPU.Build.0 = Release|Any CPU
{D241B525-3B50-42EA-9E43-052745549BA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D241B525-3B50-42EA-9E43-052745549BA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D241B525-3B50-42EA-9E43-052745549BA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D241B525-3B50-42EA-9E43-052745549BA6}.Release|Any CPU.Build.0 = Release|Any CPU
{1FA0B07B-E65C-4380-94A4-75F10312487D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FA0B07B-E65C-4380-94A4-75F10312487D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FA0B07B-E65C-4380-94A4-75F10312487D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FA0B07B-E65C-4380-94A4-75F10312487D}.Release|Any CPU.Build.0 = Release|Any CPU
{FC5F9350-B812-4C62-AE76-0FF437F0F362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC5F9350-B812-4C62-AE76-0FF437F0F362}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC5F9350-B812-4C62-AE76-0FF437F0F362}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC5F9350-B812-4C62-AE76-0FF437F0F362}.Release|Any CPU.Build.0 = Release|Any CPU
{14B1CA94-1222-4D2E-B37A-1FF8676E233E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14B1CA94-1222-4D2E-B37A-1FF8676E233E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14B1CA94-1222-4D2E-B37A-1FF8676E233E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14B1CA94-1222-4D2E-B37A-1FF8676E233E}.Release|Any CPU.Build.0 = Release|Any CPU
{430F312C-550B-4D1F-907F-01A72F3E5CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{430F312C-550B-4D1F-907F-01A72F3E5CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{430F312C-550B-4D1F-907F-01A72F3E5CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{430F312C-550B-4D1F-907F-01A72F3E5CF2}.Release|Any CPU.Build.0 = Release|Any CPU
{BAE7C213-5950-4916-B456-A482828D89A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAE7C213-5950-4916-B456-A482828D89A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAE7C213-5950-4916-B456-A482828D89A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAE7C213-5950-4916-B456-A482828D89A0}.Release|Any CPU.Build.0 = Release|Any CPU
{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8}.Release|Any CPU.Build.0 = Release|Any CPU
{0BF42289-98E1-4490-8934-AF56B05ADB8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BF42289-98E1-4490-8934-AF56B05ADB8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BF42289-98E1-4490-8934-AF56B05ADB8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BF42289-98E1-4490-8934-AF56B05ADB8B}.Release|Any CPU.Build.0 = Release|Any CPU
{6A70E853-DFAF-4484-90FC-ACA755CD02A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A70E853-DFAF-4484-90FC-ACA755CD02A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A70E853-DFAF-4484-90FC-ACA755CD02A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A70E853-DFAF-4484-90FC-ACA755CD02A4}.Release|Any CPU.Build.0 = Release|Any CPU
{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48}.Release|Any CPU.Build.0 = Release|Any CPU
{25544326-C145-4D05-A4C3-AC7D59E17196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25544326-C145-4D05-A4C3-AC7D59E17196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25544326-C145-4D05-A4C3-AC7D59E17196}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25544326-C145-4D05-A4C3-AC7D59E17196}.Release|Any CPU.Build.0 = Release|Any CPU
{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{89ED416F-92F1-4425-9379-D4E76A285860} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{278B1311-41BF-4345-947E-7B70E277FC3C} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{B190F61D-854C-4EE1-9532-B81AB3215F90} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{59C7B1F0-EE4D-4098-8596-0ADDBC305234} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{BF1393D4-6099-4EF9-85BB-7EE6CBEB920C} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{7B95289B-4992-4C0D-B26F-8EC58F81FC96} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{1B8B6117-CE39-4580-BAFA-D8026102767A} = {4163E1B3-4D75-46B4-9107-9A158FD708FC}
{310E5783-455A-4D09-A7AE-39DC2AB09504} = {1B8B6117-CE39-4580-BAFA-D8026102767A}
{98500D54-FC3F-4A42-B74D-51930C19B175} = {4163E1B3-4D75-46B4-9107-9A158FD708FC}
{A551D7B1-D75A-43F0-A8E3-BAEA5EDF616A} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{C3D6C3BD-4E56-4B0F-88FD-4F2D68F0CD25} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{39320CA8-D8F0-45B6-B704-A04C16870226} = {310E5783-455A-4D09-A7AE-39DC2AB09504}
{55813F20-1269-4B19-B03E-7E4A90148F92} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{291E5BA5-608D-406D-A2DB-389412D907F3} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{743F8EC2-004E-4640-B04F-5BAFDA8BF112} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{50CF39FF-2644-4B5F-BE1A-B57487B9723B} = {743F8EC2-004E-4640-B04F-5BAFDA8BF112}
{6DC078D2-8FB1-4685-B9BE-61F1C0ED8053} = {BF1393D4-6099-4EF9-85BB-7EE6CBEB920C}
{88AC787E-603C-48C3-AEBA-D90F3E2142CA} = {6DC078D2-8FB1-4685-B9BE-61F1C0ED8053}
{D15CAEF6-0A5D-416E-B6F7-DE75C4B1D89B} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{EBD5D978-1519-45ED-AC20-EC43C7FA552C} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{265CD0AA-A1BD-40B8-A1E6-B3CB5F7591B8} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{BF9F5674-2BC3-446E-BBEA-3055A4A2B889} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{4306E048-9D81-44A8-8069-2C294289FC00} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{095F2B46-16DC-4A2E-A075-A0373D902294} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{7C299E2C-A5FE-439D-A346-2A676302BD04} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{F68DBD76-196A-4F55-BBEB-97278655017F} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{0C98BD64-8A57-46A1-B47B-EAF260DEE25A} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{F6CA82C9-85C6-4A5F-B892-4DF8A20B1C05} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{69C50655-71EE-4E69-BC2C-ABCA568F6E76} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{1D9AB69D-244C-4871-867E-DCEC52B552A4} = {1B8B6117-CE39-4580-BAFA-D8026102767A}
{781111FC-8F3C-433E-BC96-D88ADAEE3064} = {1B8B6117-CE39-4580-BAFA-D8026102767A}
{429EB088-94FF-4F06-8E54-72157089C8C3} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{778DB6EE-E5B2-4875-A209-40010B5A3E21} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{39A9F2B5-2541-423E-83C9-46C7BFF53F41} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{AE2CF906-6C98-40F5-8EE5-3DBAC572F114} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{10DD7EEB-7B3A-4BF2-9562-78831FB06001} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{D241B525-3B50-42EA-9E43-052745549BA6} = {1B8B6117-CE39-4580-BAFA-D8026102767A}
{1FA0B07B-E65C-4380-94A4-75F10312487D} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{FC5F9350-B812-4C62-AE76-0FF437F0F362} = {59C7B1F0-EE4D-4098-8596-0ADDBC305234}
{14B1CA94-1222-4D2E-B37A-1FF8676E233E} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{430F312C-550B-4D1F-907F-01A72F3E5CF2} = {1B8B6117-CE39-4580-BAFA-D8026102767A}
{BAE7C213-5950-4916-B456-A482828D89A0} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{CAEA2276-BCB8-4B1E-9E6F-E546E4BDBCA8} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{0BF42289-98E1-4490-8934-AF56B05ADB8B} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{6A70E853-DFAF-4484-90FC-ACA755CD02A4} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{B4153E7F-5CF3-4DFB-A9D1-5E77A2FB2C48} = {8C62055F-8CD7-4859-9001-634D544DF2AE}
{25544326-C145-4D05-A4C3-AC7D59E17196} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
{857C5B4B-E2A8-4ACA-98FB-5E592E2224CC} = {CECC4AE8-9C4E-4727-939B-517CC2E58D65}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CD5C2B19-49B4-480A-990C-36D98A719B07}
EndGlobalSection
EndGlobal

90
Grpc.DotNet.slnx Normal file
View File

@ -0,0 +1,90 @@
<Solution>
<Folder Name="/perf/">
<Project Path="perf/Grpc.AspNetCore.Microbenchmarks/Grpc.AspNetCore.Microbenchmarks.csproj" />
</Folder>
<Folder Name="/perf/benchmarkapps/">
<Project Path="perf/benchmarkapps/GrpcAspNetCoreServer/GrpcAspNetCoreServer.csproj" />
<Project Path="perf/benchmarkapps/GrpcClient/GrpcClient.csproj" />
<Project Path="perf/benchmarkapps/GrpcCoreServer/GrpcCoreServer.csproj" />
<Project Path="perf/benchmarkapps/QpsWorker/QpsWorker.csproj" />
</Folder>
<Folder Name="/perf/benchmarkapps/Shared/">
<File Path="perf/benchmarkapps/Shared/BenchmarkConfigurationHelpers.cs" />
<File Path="perf/benchmarkapps/Shared/BenchmarkServiceImpl.cs" />
<File Path="perf/benchmarkapps/Shared/benchmark_service.proto" />
<File Path="perf/benchmarkapps/Shared/messages.proto" />
</Folder>
<Folder Name="/perf/benchmarkapps/Shared/Certs/">
<File Path="perf/benchmarkapps/Shared/Certs/testCert.pfx" />
</Folder>
<Folder Name="/src/">
<Project Path="src/dotnet-grpc/dotnet-grpc.csproj" />
<Project Path="src/Grpc.AspNetCore.HealthChecks/Grpc.AspNetCore.HealthChecks.csproj" />
<Project Path="src/Grpc.AspNetCore.Server.ClientFactory/Grpc.AspNetCore.Server.ClientFactory.csproj" />
<Project Path="src/Grpc.AspNetCore.Server.Reflection/Grpc.AspNetCore.Server.Reflection.csproj" />
<Project Path="src/Grpc.AspNetCore.Server/Grpc.AspNetCore.Server.csproj" />
<Project Path="src/Grpc.AspNetCore.Web/Grpc.AspNetCore.Web.csproj" />
<Project Path="src/Grpc.AspNetCore/Grpc.AspNetCore.csproj" />
<Project Path="src/Grpc.Auth/Grpc.Auth.csproj" />
<Project Path="src/Grpc.Core.Api/Grpc.Core.Api.csproj" />
<Project Path="src/Grpc.HealthCheck/Grpc.HealthCheck.csproj" />
<Project Path="src/Grpc.Net.Client.Web/Grpc.Net.Client.Web.csproj" />
<Project Path="src/Grpc.Net.Client/Grpc.Net.Client.csproj" />
<Project Path="src/Grpc.Net.ClientFactory/Grpc.Net.ClientFactory.csproj" />
<Project Path="src/Grpc.Net.Common/Grpc.Net.Common.csproj" />
<Project Path="src/Grpc.Reflection/Grpc.Reflection.csproj" />
<Project Path="src/Grpc.StatusProto/Grpc.StatusProto.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="test/dotnet-grpc.Tests/dotnet-grpc.Tests.csproj" />
<Project Path="test/FunctionalTests/Grpc.AspNetCore.FunctionalTests.csproj" />
<Project Path="test/Grpc.AspNetCore.Server.ClientFactory.Tests/Grpc.AspNetCore.Server.ClientFactory.Tests.csproj" />
<Project Path="test/Grpc.AspNetCore.Server.Tests/Grpc.AspNetCore.Server.Tests.csproj" />
<Project Path="test/Grpc.Core.Api.Tests/Grpc.Core.Api.Tests.csproj" />
<Project Path="test/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj" />
<Project Path="test/Grpc.Net.Client.Tests/Grpc.Net.Client.Tests.csproj" />
<Project Path="test/Grpc.Net.Client.Web.Tests/Grpc.Net.Client.Web.Tests.csproj" />
<Project Path="test/Grpc.Net.ClientFactory.Tests/Grpc.Net.ClientFactory.Tests.csproj" />
<Project Path="test/Grpc.Reflection.Tests/Grpc.Reflection.Tests.csproj" />
<Project Path="test/Grpc.StatusProto.Tests/Grpc.StatusProto.Tests.csproj" />
</Folder>
<Folder Name="/tests/testassets/">
<Project Path="testassets/BenchmarkWorkerWebsite/BenchmarkWorkerWebsite.csproj" />
<Project Path="testassets/FunctionalTestsWebsite/FunctionalTestsWebsite.csproj" />
<Project Path="testassets/InteropTestsClient/InteropTestsClient.csproj" />
<Project Path="testassets/InteropTestsGrpcWebClient/InteropTestsGrpcWebClient.csproj" />
<Project Path="testassets/InteropTestsGrpcWebWebsite/InteropTestsGrpcWebWebsite.csproj" />
<Project Path="testassets/InteropTestsNativeServer/InteropTestsNativeServer.csproj" />
<Project Path="testassets/InteropTestsWebsite/InteropTestsWebsite.csproj" />
<Project Path="testassets/LinkerTestsClient/LinkerTestsClient.csproj" />
<Project Path="testassets/LinkerTestsWebsite/LinkerTestsWebsite.csproj" />
</Folder>
<Folder Name="/tests/testassets/Certs/" />
<Folder Name="/tests/testassets/Certs/InteropTests/">
<File Path="testassets/Certs/InteropTests/ca.pem" />
<File Path="testassets/Certs/InteropTests/README.md" />
<File Path="testassets/Certs/InteropTests/server1.key" />
<File Path="testassets/Certs/InteropTests/server1.pem" />
<File Path="testassets/Certs/InteropTests/server1.pfx" />
</Folder>
<Folder Name="/tests/testassets/Proto/">
<File Path="examples/Proto/race.proto" />
<File Path="testassets/Proto/any.proto" />
<File Path="testassets/Proto/authorize.proto" />
<File Path="testassets/Proto/chat.proto" />
<File Path="testassets/Proto/compression.proto" />
<File Path="testassets/Proto/count.proto" />
<File Path="testassets/Proto/greet.proto" />
<File Path="testassets/Proto/lifetime.proto" />
<File Path="testassets/Proto/nested.proto" />
<File Path="testassets/Proto/singleton.proto" />
<File Path="testassets/Proto/streaming.proto" />
<File Path="testassets/Proto/unimplemented.proto" />
</Folder>
<Folder Name="/tests/testassets/Proto/grpc/" />
<Folder Name="/tests/testassets/Proto/grpc/testing/">
<File Path="testassets/Proto/grpc/testing/empty.proto" />
<File Path="testassets/Proto/grpc/testing/messages.proto" />
<File Path="testassets/Proto/grpc/testing/test.proto" />
</Folder>
</Solution>

View File

@ -8,15 +8,17 @@ See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIB
for general contribution guidelines.
## Maintainers (in alphabetical order)
- [adityamandaleeka](https://github.com/adityamandaleeka), Microsoft Corporation
- [amcasey](https://github.com/amcasey), Microsoft Corporation
- [apolcyn](https://github.com/apolcyn), Google LLC
- [benjaminpetit](https://github.com/benjaminpetit), Microsoft Corporation
- [BrennanConroy](https://github.com/BrennanConroy), Microsoft Corporation
- [brunolins16](https://github.com/brunolins16), Microsoft Corporation
- [captainsafia](https://github.com/captainsafia), Microsoft Corporation
- [davidfowl](https://github.com/davidfowl), Microsoft Corporation
- [halter73](https://github.com/halter73), Microsoft Corporation
- [JamesNK](https://github.com/JamesNK), Microsoft Corporation
- [jtattermusch](https://github.com/jtattermusch), Google LLC
- [rafikiassumaniMSFT](https://github.com/rafikiassumaniMSFT), Microsoft Corporation
- [mgravell](https://github.com/mgravell), Microsoft Corporation
- [ReubenBond](https://github.com/ReubenBond), Microsoft Corporation
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
## Emeritus Maintainers (in alphabetical order)
- [jtattermusch](https://github.com/jtattermusch)
- [JunTaoLuo](https://github.com/JunTaoLuo)

View File

@ -70,6 +70,12 @@ To run tests from the command line:
dotnet test Grpc.DotNet.sln
```
### Alternative implementation using Code-First (external library)
An alternative way to use gRPC in .NET is to define the Protobuf contracts directly in C# using [protobuf-net](https://github.com/protobuf-net/protobuf-net.Grpc).
For more information, see the documentation on [learn.microsoft.com](https://learn.microsoft.com/aspnet/core/grpc/code-first) or the [protobuf-net.Grpc website](https://protobuf-net.github.io/protobuf-net.Grpc/).
## To contribute
Contributions are welcome!

View File

@ -1,39 +0,0 @@
<Project>
<PropertyGroup>
<BenchmarkDotNetPackageVersion>0.13.1</BenchmarkDotNetPackageVersion>
<GoogleApisAuthPackageVersion>1.46.0</GoogleApisAuthPackageVersion>
<GoogleProtobufPackageVersion>3.21.5</GoogleProtobufPackageVersion>
<GrpcDotNetPackageVersion>2.47.0</GrpcDotNetPackageVersion> <!-- Used by example projects -->
<GrpcPackageVersion>2.46.3</GrpcPackageVersion>
<GrpcToolsPackageVersion>2.49.0-pre1</GrpcToolsPackageVersion>
<MicrosoftAspNetCoreAppPackageVersion>7.0.0-preview.6.22327.7</MicrosoftAspNetCoreAppPackageVersion>
<MicrosoftAspNetCoreApp6PackageVersion>6.0.0</MicrosoftAspNetCoreApp6PackageVersion>
<MicrosoftAspNetCoreApp5PackageVersion>5.0.3</MicrosoftAspNetCoreApp5PackageVersion>
<MicrosoftAspNetCoreApp31PackageVersion>3.1.3</MicrosoftAspNetCoreApp31PackageVersion>
<MicrosoftBuildLocatorPackageVersion>1.2.2</MicrosoftBuildLocatorPackageVersion>
<MicrosoftBuildPackageVersion>16.0.461</MicrosoftBuildPackageVersion>
<MicrosoftCodeAnalysisNetAnalyzersPackageVersion>7.0.0-preview1.22310.1</MicrosoftCodeAnalysisNetAnalyzersPackageVersion>
<MicrosoftCrankEventSourcesPackageVersion>0.2.0-alpha.21255.1</MicrosoftCrankEventSourcesPackageVersion>
<MicrosoftExtensionsLoggingTestingPackageVersion>2.1.1</MicrosoftExtensionsLoggingTestingPackageVersion>
<MicrosoftExtensionsPackageVersion>3.0.3</MicrosoftExtensionsPackageVersion>
<MicrosoftNETTestSdkPackageVersion>16.9.1</MicrosoftNETTestSdkPackageVersion>
<MicrosoftSourceLinkGitHubPackageVersion>1.0.0</MicrosoftSourceLinkGitHubPackageVersion>
<MicrosoftTyePackageVersion>0.5.0-alpha.20555.1</MicrosoftTyePackageVersion>
<MicrosoftWin32RegistryLinePackageVersion>4.6.0</MicrosoftWin32RegistryLinePackageVersion>
<MoqPackageVersion>4.16.1</MoqPackageVersion>
<NewtonsoftJsonPackageVersion>12.0.3</NewtonsoftJsonPackageVersion>
<NunitPackageVersion>3.13.1</NunitPackageVersion>
<Nunit3TestAdapterPackageVersion>3.16.1</Nunit3TestAdapterPackageVersion>
<OpenTelemetryPackageVersion>1.3.0</OpenTelemetryPackageVersion>
<OpenTelemetryIntergationPackageVersion>1.0.0-rc9.4</OpenTelemetryIntergationPackageVersion>
<ProtobufNetGrpcPackageVersion>1.0.140</ProtobufNetGrpcPackageVersion>
<SystemCommandLinePackageVersion>2.0.0-beta3.22114.1</SystemCommandLinePackageVersion>
<SystemCommandLineRenderingPackageVersion>0.4.0-alpha.22114.1</SystemCommandLineRenderingPackageVersion>
<SystemDiagnosticsDiagnosticSourcePackageVersion>4.5.1</SystemDiagnosticsDiagnosticSourcePackageVersion>
<SystemIOPipelinesPackageVersion>5.0.1</SystemIOPipelinesPackageVersion>
<SystemMemoryPackageVersion>4.5.3</SystemMemoryPackageVersion>
<SystemNetHttpWinHttpHandlerPackageVersion>6.0.1</SystemNetHttpWinHttpHandlerPackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.6.0</SystemSecurityPrincipalWindowsPackageVersion>
<SystemThreadingChannelsPackageVersion>4.6.0</SystemThreadingChannelsPackageVersion>
</PropertyGroup>
</Project>

View File

@ -18,7 +18,7 @@ ensure_dir() {
# main
# resolve SDK version
sdk_version="7.0.100-rc.1.22424.4"
sdk_version=$(jq -r .sdk.version $global_json_path)
# download dotnet-install.sh
ensure_dir $OBJDIR
@ -27,14 +27,14 @@ echo "Downloading install script: $install_script_url => $install_script_path"
curl -sSL -o $install_script_path $install_script_url
chmod +x $install_script_path
# Install .NET Core 3.x SDK to run 3.x test targets
$install_script_path -v 3.1.300 -i $dotnet_install_path
# Install .NET 5 SDK to run 5.0 test targets
$install_script_path -v 5.0.302 -i $dotnet_install_path
# Install .NET 6 SDK to run 6.0 test targets
$install_script_path -v 6.0.202 -i $dotnet_install_path
$install_script_path -v 6.0.423 -i $dotnet_install_path
# Install .NET 7 SDK to run 7.0 test targets
$install_script_path -v 7.0.410 -i $dotnet_install_path
# Install .NET 8 SDK to run 8.0 test targets
$install_script_path -v 8.0.301 -i $dotnet_install_path
# Install .NET version specified by global.json
$install_script_path -v $sdk_version -i $dotnet_install_path

View File

@ -1,19 +0,0 @@
<Project>
<PropertyGroup Label="RestoreSources">
<RestoreSources>
$(RestoreSources);
https://api.nuget.org/v3/index.json;
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;
</RestoreSources>
<RestoreSources Condition="Exists('$(MSBuildThisFileDirectory)feed')">
$(RestoreSources);
$(MSBuildThisFileDirectory)feed;
</RestoreSources>
<!-- The following is used to ingest nightly gRPC packages -->
<RestoreSources>
$(RestoreSources);
https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev;
</RestoreSources>
</PropertyGroup>
</Project>

View File

@ -2,13 +2,13 @@
<PropertyGroup>
<!-- package version of grpc-dotnet -->
<GrpcDotnetVersion>2.49.0-dev</GrpcDotnetVersion>
<GrpcDotnetVersion>2.66.0-dev</GrpcDotnetVersion>
<!-- assembly version of grpc-dotnet -->
<GrpcDotnetAssemblyVersion>2.0.0.0</GrpcDotnetAssemblyVersion>
<!-- file version of all grpc-dotnet -->
<GrpcDotnetAssemblyFileVersion>2.49.0.0</GrpcDotnetAssemblyFileVersion>
<GrpcDotnetAssemblyFileVersion>2.66.0.0</GrpcDotnetAssemblyFileVersion>
</PropertyGroup>
</Project>

View File

@ -22,22 +22,21 @@ echo "Building solution"
dotnet build -c Release
echo "Building examples"
example_solutions=( $( ls examples/**/*.sln ) )
example_solutions=( $( ls examples/**/*.slnx ) )
for example_solution in "${example_solutions[@]}"
do
dotnet build $example_solution -c Release
done
echo "Testing solution"
has_failures=false
test_projects=( $( ls test/**/*Tests.csproj ) )
for test_project in "${test_projects[@]}"
do
# https://github.com/microsoft/vstest/issues/2080#issuecomment-539879345
dotnet test $test_project -c Release -v n --no-build < /dev/null
base_name=$(basename ${test_project%.*})
dotnet test $test_project -c Release --no-build --logger "trx;LogFilePrefix=$base_name" --results-directory artifacts/test-results -- NUnit.ConsoleOut=0 || has_failures=true
done
echo "Tests finished"
if [ "$has_failures" = true ]; then
exit 1
fi

View File

@ -22,12 +22,13 @@ Here are some key points in which the two implementation differ:
- grpc-dotnet server integrates seamlessly ASP.NET Core (and allows e.g. dependency injection)
- performance (while data we have data that seems to indicate that grpc-dotnet peforms at least as well as Grpc.Core, we strongly encourage to run your own benchmarks if performance matters for your application)
- features available (see breakdown below)
## Frameworks supported
Grpc.Core supports a wide range of .NET Framework versions, included some very old ones. A more detailed overview is [here]( https://github.com/grpc/grpc/tree/master/src/csharp#supported-platforms)
Grpc.Core supports a wide range of .NET versions, including some very old ones. A more detailed overview is [here]( https://github.com/grpc/grpc/tree/master/src/csharp#supported-platforms)
grpc-dotnet requires a more modern .NET Framework: A detailed summary of .NET Framework versions supported by grpc-dotnet is [here](https://docs.microsoft.com/en-us/aspnet/core/grpc/supported-platforms). Note that there's ongoing work to add [grpc-dotnet client support on
legacy .NET Framework](https://docs.microsoft.com/en-us/aspnet/core/grpc/netstandard).
grpc-dotnet uses features only available in modern .NET releases. It doesn't support some older versions of .NET. A detailed summary of .NET versions supported by grpc-dotnet is [here](https://docs.microsoft.com/aspnet/core/grpc/supported-platforms). There is limited support for [grpc-dotnet client support on
legacy .NET Framework](https://docs.microsoft.com/aspnet/core/grpc/netstandard).
## Comparison of supported features
@ -42,18 +43,20 @@ In grpc-dotnet, we currently don't provide proxyless service mesh support, but i
### Load Balancing
Grpc.Core provides basic client load balancing policies PICK_FIRST, ROUND_ROBIN. Besides that, there are two client-lookaside LB policies that are implemented, but we don't recommend using them.
grpc-dotnet and Grpc.Core provides basic client load balancing policies PICK_FIRST, ROUND_ROBIN.
- grpclb - limited use externally as there's no official implementation of the LB policy. We don't recommend using as it's been basically deprecated by the XDS loadbalancing.
Grpc.Core also has implemented two client-lookaside LB policies, but we don't recommend using them:
- grpclb - limited use externally as there's no official implementation of the LB policy. We don't recommend using it as it's been deprecated by the XDS load balancing.
- XDS - Load balancing using the Envoy Universal Data Plane APIs (xDS). It does work in Grpc.Core (because it's implemented in C-core native library), but as noted above, we don't provide official support for the proxyless service mesh functionality in Grpc.Core.
grpc-dotnet currently doesn't provide any loadbalancing policies, but there is ongoing work to add basic client load balancing policies, as well as suport for XDS loadbalancing.
Proxy load balancing is supported by both implementations because load balancing is done by a separate process (e.g. Envoy, ngingx etc.) that proxies the traffic.
Proxy loadbalancing is supported by both implementations because loadbalancing is done by a separate process (e.g. Envoy, ngingx etc.) that proxies the traffic.
None of the implementations currently allow user-provided custom loadbalancing policies (= a plugin that provides the loadbalancing logic).
grpc-dotnet allows user-provided custom load-balancing policies (= a plugin that provides the load-balancing logic).
Also see:
- https://learn.microsoft.com/aspnet/core/grpc/loadbalancing
- https://github.com/grpc/grpc/blob/master/doc/load-balancing.md
- https://github.com/grpc/grpc/blob/master/doc/naming.md
- https://github.com/grpc/proposal/blob/master/A5-grpclb-in-dns.md
@ -61,7 +64,7 @@ Also see:
### Service config
Service config is currently only supported by Grpc.Core. Right now the feature is not that useful
Service config is supported by grpc-dotnet and Grpc.Core. Right now, the feature is not that useful
because support for service config encoded in DNS records hasn't been enabled yet by default.
Also see:
@ -79,7 +82,7 @@ Grpc.Core: currently not supported.
Both implementations support client and server interceptors from Grpc.Core.Interceptors namespace. Interceptors operate at post-deserialization and pre-serialization level (no access to binary payloads).
In addition to gRPC-aware interceptors, grpc-dotnet also allows interception at a HTTP/2 level:
In addition to gRPC-aware interceptors, grpc-dotnet also allows interception at an HTTP/2 level:
- Incoming gRPC HTTP/2 requests can be processed using [ASP.NET Core middleware](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/).
- Outgoing gRPC HTTP/2 requests can be processed using [HttpClient HttpMessageHandlers](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpmessagehandler).
@ -90,23 +93,25 @@ Both implementations fully support gRPC over HTTP/2 in both TLS and plaintext.
Grpc.Core gets support for other transports supported by C-Core for free. Some (minor) integration work might be required to actually use these transports with gRPC C#.
grpc-dotnet only supports the default transport.
grpc-dotnet supports other transports in .NET 5 or later. For example, grpc-dotnet [supports interprocess communication (IPC)](https://learn.microsoft.com/aspnet/core/grpc/interprocess) using named pipes and Unix domain sockets.
Notes:
- Grpc.Core allows connections over UDS socket (both server and client) on Unix systems. It doesn't support named pipes on windows.
- Grpc.Core supports additional "transports" like ALTS and cfstream thanks to being build on top of C-core.
- Grpc.Core could provide an inprocess transport support but currently this functionality is not exposed in C# API.
- grpc-dotnet support for TLS is platform dependent. TLS is fully supported on Windows and Linux, but doesn't work on MacOS.
- grpc-dotnet support UDS socket on the server-side (On Unix systems, but also on [Windows](https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/))
- grpc-dotnet support for TLS is platform dependent. TLS is fully supported on Windows and Linux. There is limited support for servers hosted on MacOS prior to .NET 8.
### Retries / Request Hedging
Grpc.Core: implementation in C-core in progress, but no ETA yet
grpc-dotnet: not implemented
grpc-dotnet: Retries and hedging are fully supported.
https://github.com/grpc/proposal/blob/master/A6-client-retries.md,
Also see:
- https://learn.microsoft.com/aspnet/core/grpc/retries
- https://github.com/grpc/proposal/blob/master/A6-client-retries.md
### Channelz
@ -128,7 +133,7 @@ https://github.com/grpc/grpc/blob/master/doc/binary-logging.md
Grpc.Core: supported (algorithms: `gzip`, `deflate`)
grpc-dotnet: supported (algorithms: `gzip`), also provides public API to provide custom compression algorithm.
grpc-dotnet: supported (algorithms: `gzip`, `deflate`), also provides public API to provide custom compression algorithm.
Performance implications of using compression in both implementations haven't been measured. Compression functionality is offered mostly to comply with the spec.
@ -139,7 +144,7 @@ https://github.com/grpc/grpc/blob/master/doc/compression_cookbook.md
Grpc.Core: supported (exposed publicly on Channel), provided by C-Core
grpc-dotnet: not supported (to provide support, changes to .NET HttpClient are needed, so adding support is non-trivial).
grpc-dotnet: Supported on .NET 5 or later
https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md
@ -163,7 +168,7 @@ https://github.com/grpc/grpc/blob/master/doc/keepalive.md
Grpc.Core: supported, provided by C-core
grpc-dotnet: not supported (implementing the wait_for_ready flag requires supporting channel connectivity first).
grpc-dotnet: Supported on .NET 5 or later
https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md
@ -171,7 +176,7 @@ https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md
Grpc.Core: conforms with the spec thanks to the C-core dependency. It is currently not possible to provide custom C# resolvers via resolver API (the APIs are in C core and aren't exposed in the C# layer).
grpc-dotnet: only resolves basic DNS names. No API to provide a custom resolver.
grpc-dotnet: Resolving is fully supported on .NET 5 or later. grpc-dotnet also provides an [API to write custom resolvers](https://learn.microsoft.com/aspnet/core/grpc/loadbalancingwrite-custom-resolvers-and-load-balancers).
https://github.com/grpc/grpc/blob/master/doc/naming.md
@ -181,7 +186,7 @@ grpc-dotnet allows port-sharing: serving both gRPC and non-gRPC traffic by the s
## Add-on Features
Features that don't necessarily require changes to implementation's internals. They usually come as a separate opt-in nuget package.
Features that don't necessarily require changes to the implementation's internals. They usually come as a separate opt-in nuget package.
### Addon: Server Reflection
Grpc.Core: supported via Grpc.Reflection nuget package
@ -213,4 +218,22 @@ grpc-dotnet supports integration with `HttpClientFactory` via the Grpc.Net.Clien
- Reuse of channel instances.
- Automatic propagation of cancellation and deadline when used in a `Grpc.AspNetCore` hosted gRPC service.
https://docs.microsoft.com/en-us/aspnet/core/grpc/clientfactory
### Addon: gRPC JSON transcoding
grpc-dotnet supports providing a RESTful JSON API using [gRPC JSON transcoding](https://learn.microsoft.com/aspnet/core/grpc/json-transcoding).
gRPC JSON transcoding is an extension for ASP.NET Core that creates RESTful JSON APIs for gRPC services. Once configured, transcoding allows apps to call gRPC services with familiar HTTP concepts:
- HTTP verbs
- URL parameter binding
- JSON requests/responses
gRPC can still be used to call services.
### Addon: gRPC-Web
grpc-dotnet supports the [gRPC-Web protocol](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md).
gRPC-Web allows browser JavaScript and Blazor apps to call gRPC services. It's not possible to call a gRPC service over HTTP/2 from a browser-based app. gRPC services hosted in ASP.NET Core can be configured to support gRPC-Web alongside gRPC over HTTP/2.
https://learn.microsoft.com/aspnet/core/grpc/grpcweb

View File

@ -10,7 +10,7 @@ release that the new release depends on.
## Releasing a new version of grpc-dotnet (every 6 weeks)
- Before cutting the release branch
- If needed, on the master branch update the `<GrpcToolsPackageVersion>` and `<GrpcPackageVersion>` dependency versions in [dependencies.props](https://github.com/grpc/grpc-dotnet/blob/master/build/dependencies.props)
- If needed, on the master branch update the `Grpc.Tools` and `Grpc.Core` dependency versions in [Directory.Packages.props](https://github.com/grpc/grpc-dotnet/blob/master/Directory.Packages.props)
to the latest pre-release of `Grpc.Tools` or `Grpc.Core` (that was released as part of the grpc/grpc release process)
- Make sure that any patches/bugfixes from the last released branch have been applied to the master branch as well.
@ -40,7 +40,7 @@ release that the new release depends on.
- Build the signed nuget packages and push them to nuget.org (internal process). **These are the stable grpc-dotnet packages.**
- Create a new release and tag in https://github.com/grpc/grpc-dotnet/releases (by creating the tag from the current release branch).
This is the stable release. Fill in the release notes.
This is the stable release. Fill in the release notes and list changes since the previous _stable_ version.
### After the release

View File

@ -1,4 +1,3 @@
version: '3'
services:
grpcweb-server:
build:

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@ -10,9 +10,9 @@
<Protobuf Include="..\Proto\greet.proto" GrpcServices="None" Link="Protos\greet.proto"/>
<Protobuf Include="..\Proto\count.proto" GrpcServices="None" Link="Protos\count.proto"/>
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -16,68 +16,54 @@
#endregion
using System;
using System.Threading;
using System.Threading.Tasks;
using Aggregate;
using Count;
using Greet;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Aggregator.AggregatorClient(channel);
await ServerStreamingCallExample(client);
await ClientStreamingCallExample(client);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
static async Task ServerStreamingCallExample(Aggregator.AggregatorClient client)
{
public class Program
var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromSeconds(3.5));
using var call = client.SayHellos(new HelloRequest { Name = "AggregatorClient" }, cancellationToken: cts.Token);
try
{
private static readonly Random Random = new Random();
static async Task Main(string[] args)
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Aggregator.AggregatorClient(channel);
await ServerStreamingCallExample(client);
await ClientStreamingCallExample(client);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
private static async Task ServerStreamingCallExample(Aggregator.AggregatorClient client)
{
var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromSeconds(3.5));
using var call = client.SayHellos(new HelloRequest { Name = "AggregatorClient" }, cancellationToken: cts.Token);
try
{
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
Console.WriteLine("Greeting: " + message.Message);
}
}
catch (RpcException ex) when (ex.StatusCode == StatusCode.Cancelled)
{
Console.WriteLine("Stream cancelled.");
}
}
private static async Task ClientStreamingCallExample(Aggregator.AggregatorClient client)
{
using var call = client.AccumulateCount();
for (var i = 0; i < 3; i++)
{
var count = Random.Next(5);
Console.WriteLine($"Accumulating with {count}");
await call.RequestStream.WriteAsync(new CounterRequest { Count = count });
await Task.Delay(2000);
}
await call.RequestStream.CompleteAsync();
var response = await call;
Console.WriteLine($"Count: {response.Count}");
Console.WriteLine("Greeting: " + message.Message);
}
}
catch (RpcException ex) when (ex.StatusCode == StatusCode.Cancelled)
{
Console.WriteLine("Stream cancelled.");
}
}
static async Task ClientStreamingCallExample(Aggregator.AggregatorClient client)
{
using var call = client.AccumulateCount();
for (var i = 0; i < 3; i++)
{
var count = Random.Shared.Next(5);
Console.WriteLine($"Accumulating with {count}");
await call.RequestStream.WriteAsync(new CounterRequest { Count = count });
await Task.Delay(2000);
}
await call.RequestStream.CompleteAsync();
var response = await call;
Console.WriteLine($"Count: {response.Count}");
}

View File

@ -16,23 +16,59 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Count;
using Greet;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using Server;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
builder.Services.AddSingleton<IncrementingCounter>();
if (bool.TryParse(builder.Configuration["EnableOpenTelemetry"], out var enableOpenTelemetry) && enableOpenTelemetry)
{
public class Program
{
public static void Main(string[] args)
builder.Services.AddOpenTelemetry()
.WithTracing(tracing =>
{
CreateHostBuilder(args).Build().Run();
}
tracing.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("aggregator"));
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
if (builder.Environment.IsDevelopment())
{
// We want to view all traces in development
tracing.SetSampler(new AlwaysOnSampler());
}
tracing.AddAspNetCoreInstrumentation()
.AddGrpcClientInstrumentation()
.AddHttpClientInstrumentation();
tracing.AddZipkinExporter();
});
}
// These clients will call back to the server
builder.Services
.AddGrpcClient<Greeter.GreeterClient>((s, o) => { o.Address = GetCurrentAddress(s); })
.EnableCallContextPropagation();
builder.Services
.AddGrpcClient<Counter.CounterClient>((s, o) => { o.Address = GetCurrentAddress(s); })
.EnableCallContextPropagation();
var app = builder.Build();
app.MapGrpcService<GreeterService>();
app.MapGrpcService<CounterService>();
app.MapGrpcService<AggregatorService>();
app.Run();
static Uri GetCurrentAddress(IServiceProvider serviceProvider)
{
// Get the address of the current server from the request
var context = serviceProvider.GetRequiredService<IHttpContextAccessor>()?.HttpContext;
if (context == null)
{
throw new InvalidOperationException("Could not get HttpContext.");
}
return new Uri($"{context.Request.Scheme}://{context.Request.Host.Value}");
}

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@ -9,13 +9,13 @@
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Both" Link="Protos\greet.proto" />
<Protobuf Include="..\Proto\count.proto" GrpcServices="Both" Link="Protos\count.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" Version="$(OpenTelemetryPackageVersion)" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="$(OpenTelemetryIntergationPackageVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="$(OpenTelemetryIntergationPackageVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="$(OpenTelemetryIntergationPackageVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="$(OpenTelemetryIntergationPackageVersion)" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
</ItemGroup>
</Project>

View File

@ -1,98 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System;
using Count;
using Greet;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
namespace Server
{
public partial class Startup
{
private readonly IConfiguration _configuration;
private const string EnableOpenTelemetryKey = "EnableOpenTelemetry";
public Startup(IConfiguration configuration)
{
_configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddSingleton<IncrementingCounter>();
if (bool.TryParse(_configuration[EnableOpenTelemetryKey], out var enableOpenTelemetry) && enableOpenTelemetry)
{
services.AddOpenTelemetryTracing(telemetry =>
{
telemetry.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("aggregator"));
telemetry.AddZipkinExporter();
telemetry.AddGrpcClientInstrumentation();
telemetry.AddHttpClientInstrumentation();
telemetry.AddAspNetCoreInstrumentation();
});
}
// These clients will call back to the server
services
.AddGrpcClient<Greeter.GreeterClient>((s, o) => { o.Address = GetCurrentAddress(s); })
.EnableCallContextPropagation();
services
.AddGrpcClient<Counter.CounterClient>((s, o) => { o.Address = GetCurrentAddress(s); })
.EnableCallContextPropagation();
static Uri GetCurrentAddress(IServiceProvider serviceProvider)
{
// Get the address of the current server from the request
var context = serviceProvider.GetRequiredService<IHttpContextAccessor>()?.HttpContext;
if (context == null)
{
throw new InvalidOperationException("Could not get HttpContext.");
}
return new Uri($"{context.Request.Scheme}://{context.Request.Host.Value}");
}
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<GreeterService>();
endpoints.MapGrpcService<CounterService>();
endpoints.MapGrpcService<AggregatorService>();
});
}
}
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29521.150
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{B22D0F2E-D67A-413E-9450-4B64A60B56EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{09CAF21C-D7D8-478C-9E74-3678DF615B8F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B22D0F2E-D67A-413E-9450-4B64A60B56EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B22D0F2E-D67A-413E-9450-4B64A60B56EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B22D0F2E-D67A-413E-9450-4B64A60B56EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B22D0F2E-D67A-413E-9450-4B64A60B56EF}.Release|Any CPU.Build.0 = Release|Any CPU
{09CAF21C-D7D8-478C-9E74-3678DF615B8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09CAF21C-D7D8-478C-9E74-3678DF615B8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09CAF21C-D7D8-478C-9E74-3678DF615B8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09CAF21C-D7D8-478C-9E74-3678DF615B8F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {95736335-0C8B-4FDA-8722-E08046339B83}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(MicrosoftAspNetCoreAppPackageVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Net.Client.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Net.Client.Web" />
<Protobuf Include="..\Proto\weather.proto" GrpcServices="Client" Link="Protos\weather.proto" Access="Internal" />
<Protobuf Include="..\Proto\count.proto" GrpcServices="Client" Link="Protos\count.proto" Access="Internal" />

View File

@ -16,23 +16,38 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.ResponseCompression;
using Server.Services;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
builder.Services.AddResponseCompression(opts =>
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
new[] { "application/octet-stream" });
});
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
var app = builder.Build();
app.UseResponseCompression();
if (app.Environment.IsDevelopment())
{
app.UseWebAssemblyDebugging();
}
else
{
app.UseHsts();
}
app.UseBlazorFrameworkFiles();
app.UseStaticFiles();
app.UseRouting();
app.UseGrpcWeb();
app.MapGrpcService<WeatherService>().EnableGrpcWeb();
app.MapGrpcService<CounterService>().EnableGrpcWeb();
app.MapFallbackToFile("index.html");
app.Run();

View File

@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>46982f83-f153-443e-b589-4b2bc7b5945e</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\weather.proto" GrpcServices="Server" Link="Protos\weather.proto" />
<Protobuf Include="..\Proto\count.proto" GrpcServices="Server" Link="Protos\count.proto" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<PackageReference Include="Grpc.AspNetCore" />
<PackageReference Include="Grpc.AspNetCore.Web" />
</ItemGroup>
<ItemGroup>

View File

@ -1,69 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Server.Services;
namespace Server
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddResponseCompression(opts =>
{
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
new[] { "application/octet-stream" });
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseResponseCompression();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseWebAssemblyDebugging();
}
app.UseStaticFiles();
app.UseBlazorFrameworkFiles();
app.UseRouting();
app.UseGrpcWeb();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<WeatherService>().EnableGrpcWeb();
endpoints.MapGrpcService<CounterService>().EnableGrpcWeb();
endpoints.MapFallbackToFile("index.html");
});
}
}
}

View File

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,3 @@
<Solution>
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -16,23 +16,24 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Server.Services;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseGrpcWeb();
app.MapGrpcService<GreeterService>().EnableGrpcWeb();
app.Run();

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<SpaRoot>wwwroot\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**;$(SpaRoot)dist\**</DefaultItemExcludes>
</PropertyGroup>
@ -9,8 +9,8 @@
<ItemGroup>
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Server" Link="Protos\greet.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
<PackageReference Include="Grpc.AspNetCore.Web" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">

View File

@ -1,59 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Server.Services;
namespace Server
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseRouting();
app.UseGrpcWeb();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<GreeterService>().EnableGrpcWeb();
});
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,8 @@
"devDependencies": {
"@grpc/proto-loader": "^0.3.0",
"google-protobuf": "^3.6.1",
"grpc": "^1.15.0",
"grpc-web": "^1.0.0",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0"
"webpack": "^5.94.0",
"webpack-cli": "^5.0.1"
}
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -2,15 +2,15 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\certify.proto" GrpcServices="Client" Link="Protos\certify.proto" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<None Update="Certs\client.pfx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -16,77 +16,66 @@
#endregion
using System;
using System.IO;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Certify;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
// The server will return 403 (Forbidden). The method requires a certificate
await CallCertificateInfo(includeClientCertificate: false);
// The server will return a successful gRPC response
await CallCertificateInfo(includeClientCertificate: true);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
static async Task CallCertificateInfo(bool includeClientCertificate)
{
public class Program
try
{
static async Task Main(string[] args)
Console.WriteLine($"Setting up HttpClient. Client has certificate: {includeClientCertificate}");
using var channel = GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions
{
// The server will return 403 (Forbidden). The method requires a certificate
await CallCertificateInfo(includeClientCertificate: false);
HttpHandler = CreateHttpHandler(includeClientCertificate)
});
var client = new Certifier.CertifierClient(channel);
// The server will return a successful gRPC response
await CallCertificateInfo(includeClientCertificate: true);
Console.WriteLine("Sending gRPC call...");
var certificateInfo = await client.GetCertificateInfoAsync(new Empty());
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
private static async Task CallCertificateInfo(bool includeClientCertificate)
Console.WriteLine($"Server received client certificate: {certificateInfo.HasCertificate}");
if (certificateInfo.HasCertificate)
{
try
{
Console.WriteLine($"Setting up HttpClient. Client has certificate: {includeClientCertificate}");
using var channel = GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions
{
HttpHandler = CreateHttpHandler(includeClientCertificate)
});
var client = new Certifier.CertifierClient(channel);
Console.WriteLine("Sending gRPC call...");
var certificateInfo = await client.GetCertificateInfoAsync(new Empty());
Console.WriteLine($"Server received client certificate: {certificateInfo.HasCertificate}");
if (certificateInfo.HasCertificate)
{
Console.WriteLine($"Client certificate name: {certificateInfo.Name}");
}
}
catch (RpcException ex)
{
Console.WriteLine($"gRPC error from calling service: {ex.Status.Detail}");
}
catch
{
Console.WriteLine($"Unexpected error calling service.");
throw;
}
}
private static HttpClientHandler CreateHttpHandler(bool includeClientCertificate)
{
var handler = new HttpClientHandler();
if (includeClientCertificate)
{
// Load client certificate
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var certPath = Path.Combine(basePath!, "Certs", "client.pfx");
var clientCertificate = new X509Certificate2(certPath, "1111");
handler.ClientCertificates.Add(clientCertificate);
}
return handler;
Console.WriteLine($"Client certificate name: {certificateInfo.Name}");
}
}
catch (RpcException ex)
{
Console.WriteLine($"gRPC error from calling service: {ex.Status.Detail}");
}
catch
{
Console.WriteLine($"Unexpected error calling service.");
throw;
}
Console.WriteLine();
}
static HttpClientHandler CreateHttpHandler(bool includeClientCertificate)
{
var handler = new HttpClientHandler();
if (includeClientCertificate)
{
// Load client certificate
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var certPath = Path.Combine(basePath!, "Certs", "client.pfx");
var clientCertificate = X509CertificateLoader.LoadPkcs12FromFile(certPath, "1111");
handler.ClientCertificates.Add(clientCertificate);
}
return handler;
}

View File

@ -16,31 +16,36 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Authentication.Certificate;
using Microsoft.AspNetCore.Server.Kestrel.Https;
using Microsoft.Extensions.Hosting;
using Server;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.ConfigureKestrel(kestrelOptions =>
{
public class Program
kestrelOptions.ConfigureHttpsDefaults(httpsOptions =>
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
httpsOptions.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
});
});
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(kestrelOptions =>
{
kestrelOptions.ConfigureHttpsDefaults(httpsOptions =>
{
httpsOptions.ClientCertificateMode = ClientCertificateMode.AllowCertificate;
});
});
webBuilder.UseStartup<Startup>();
});
}
}
builder.Services.AddGrpc();
builder.Services.AddAuthorization();
builder.Services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme)
.AddCertificate(options =>
{
// Not recommended in production environments. The example is using a self-signed test certificate.
options.RevocationMode = X509RevocationMode.NoCheck;
options.ChainTrustValidationMode = X509ChainTrustMode.CustomRootTrust;
options.AllowedCertificateTypes = CertificateTypes.All;
});
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.MapGrpcService<CertifierService>();
app.Run();

View File

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\certify.proto" GrpcServices="Server" Link="Protos\certify.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Certificate" />
</ItemGroup>
</Project>

View File

@ -1,62 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Authentication.Certificate;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Server
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddAuthorization();
services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme)
.AddCertificate(options =>
{
// Not recommended in production environments. The example is using a self-signed test certificate.
options.RevocationMode = X509RevocationMode.NoCheck;
options.AllowedCertificateTypes = CertificateTypes.All;
});
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<CertifierService>();
});
}
}
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -2,15 +2,15 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\data_channel.proto" GrpcServices="Client" Link="Protos\data_channel.proto" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -22,51 +22,45 @@ using Google.Protobuf;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new DataChanneler.DataChannelerClient(channel);
await UploadDataAsync(client);
await DownloadResultsAsync(client);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
static async Task UploadDataAsync(DataChanneler.DataChannelerClient client)
{
public partial class Program
var call = client.UploadData();
var dataChunks = TestData.Chunk(5);
foreach (var chunk in dataChunks)
{
public static readonly byte[] TestData = Encoding.UTF8.GetBytes("The quick brown fox jumped over the lazy dog.");
Console.WriteLine($"Uploading chunk: {chunk.Length} bytes");
await call.RequestStream.WriteAsync(new DataRequest { Value = ByteString.CopyFrom(chunk) });
}
static async Task Main(string[] args)
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new DataChanneler.DataChannelerClient(channel);
await call.RequestStream.CompleteAsync();
await UploadDataAsync(client);
var result = await call;
Console.WriteLine($"Total upload processed: {result.BytesProcessed} bytes");
}
await DownloadResultsAsync(client);
static async Task DownloadResultsAsync(DataChanneler.DataChannelerClient client)
{
var call = client.DownloadResults(new DataRequest { Value = ByteString.CopyFrom(TestData) });
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
private static async Task UploadDataAsync(DataChanneler.DataChannelerClient client)
{
var call = client.UploadData();
var dataChunks = TestData.Chunk(5);
foreach (var chunk in dataChunks)
{
Console.WriteLine($"Uploading chunk: {chunk.Length} bytes");
await call.RequestStream.WriteAsync(new DataRequest { Value = ByteString.CopyFrom(chunk) });
}
await call.RequestStream.CompleteAsync();
var result = await call;
Console.WriteLine($"Total upload processed: {result.BytesProcessed} bytes");
}
private static async Task DownloadResultsAsync(DataChanneler.DataChannelerClient client)
{
var call = client.DownloadResults(new DataRequest { Value = ByteString.CopyFrom(TestData) });
await foreach (var result in call.ResponseStream.ReadAllAsync())
{
Console.WriteLine($"Downloaded bytes processed result: {result.BytesProcessed}");
}
}
await foreach (var result in call.ResponseStream.ReadAllAsync())
{
Console.WriteLine($"Downloaded bytes processed result: {result.BytesProcessed}");
}
}
public partial class Program
{
private static readonly byte[] TestData = Encoding.UTF8.GetBytes("The quick brown fox jumped over the lazy dog.");
}

View File

@ -16,24 +16,12 @@
#endregion
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Server;
namespace Server
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
var app = builder.Build();
app.MapGrpcService<DataChannelerService>();
app.Run();

View File

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\data_channel.proto" GrpcServices="Server" Link="Protos\data_channel.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
</ItemGroup>
</Project>

View File

@ -1,48 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Server
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<DataChannelerService>();
});
}
}
}

View File

@ -2,12 +2,12 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\Shared.csproj" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" />
</ItemGroup>
</Project>

View File

@ -16,27 +16,16 @@
#endregion
using System;
using System.Threading.Tasks;
using Grpc.Net.Client;
using ProtoBuf.Grpc.Client;
using Shared;
namespace Client
{
public class Program
{
static async Task Main(string[] args)
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = channel.CreateGrpcService<IGreeterService>();
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = channel.CreateGrpcService<IGreeterService>();
var reply = await client.SayHelloAsync(new HelloRequest { Name = "GreeterClient" });
Console.WriteLine("Greeting: " + reply.Message);
var reply = await client.SayHelloAsync(new HelloRequest { Name = "GreeterClient" });
Console.WriteLine("Greeting: " + reply.Message);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
}
}
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();

View File

@ -1,37 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{9E978075-E00D-4FA9-9765-18CB51C5F5EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
{9E978075-E00D-4FA9-9765-18CB51C5F5EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E978075-E00D-4FA9-9765-18CB51C5F5EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9E978075-E00D-4FA9-9765-18CB51C5F5EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E978075-E00D-4FA9-9765-18CB51C5F5EE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,5 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
<Project Path="Shared/Shared.csproj" />
</Solution>

View File

@ -16,23 +16,14 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using ProtoBuf.Grpc.Server;
using Server;
namespace Server
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
builder.Services.AddCodeFirstGrpc();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
var app = builder.Build();
app.MapGrpcService<GreeterService>();
app.Run();

View File

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\Shared.csproj" />
<PackageReference Include="protobuf-net.Grpc.AspNetCore" Version="$(ProtobufNetGrpcPackageVersion)" />
<PackageReference Include="protobuf-net.Grpc.AspNetCore" />
</ItemGroup>
</Project>

View File

@ -1,50 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using ProtoBuf.Grpc.Server;
namespace Server
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddCodeFirstGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<GreeterService>();
});
}
}
}

View File

@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="protobuf-net.Grpc" Version="$(ProtobufNetGrpcPackageVersion)" />
<PackageReference Include="protobuf-net.Grpc" />
</ItemGroup>
</Project>

View File

@ -2,14 +2,14 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Client" Link="Protos\greet.proto" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -16,39 +16,27 @@
#endregion
using System;
using System.Threading;
using System.Threading.Tasks;
using Greet;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Greeter.GreeterClient(channel);
await UnaryCallExample(client);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
static async Task UnaryCallExample(Greeter.GreeterClient client)
{
public class Program
{
static async Task Main(string[] args)
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Greeter.GreeterClient(channel);
// 'grpc-internal-encoding-request' is a special metadata value that tells
// the client to compress the request.
// This metadata is only used in the client is not sent as a header to the server.
var metadata = new Metadata();
metadata.Add("grpc-internal-encoding-request", "gzip");
await UnaryCallExample(client);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
private static async Task UnaryCallExample(Greeter.GreeterClient client)
{
// 'grpc-internal-encoding-request' is a special metadata value that tells
// the client to compress the request.
// This metadata is only used in the client is not sent as a header to the server.
var metadata = new Metadata();
metadata.Add("grpc-internal-encoding-request", "gzip");
var reply = await client.SayHelloAsync(new HelloRequest { Name = "GreeterClient" }, headers: metadata);
Console.WriteLine("Greeting: " + reply.Message);
}
}
var reply = await client.SayHelloAsync(new HelloRequest { Name = "GreeterClient" }, headers: metadata);
Console.WriteLine("Greeting: " + reply.Message);
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -16,23 +16,15 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Server;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc(o =>
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
o.ResponseCompressionAlgorithm = "gzip";
});
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
var app = builder.Build();
app.MapGrpcService<GreeterService>();
app.Run();

View File

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Server" Link="Protos\greet.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
</ItemGroup>
</Project>

View File

@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\weather.proto" GrpcServices="Server" Link="Protos\weather.proto" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<PackageReference Include="Grpc.AspNetCore" />
<PackageReference Include="Grpc.AspNetCore.Web" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /app
# Copy everything
@ -8,7 +8,7 @@ RUN dotnet restore examples/Container/Backend
RUN dotnet publish examples/Container/Backend -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Backend.dll"]

View File

@ -16,28 +16,13 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Server.Services;
namespace Server
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
var builder = WebApplication.CreateBuilder(args);
builder.Logging.SetMinimumLevel(LogLevel.Trace);
builder.Services.AddGrpc();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.SetMinimumLevel(LogLevel.Trace);
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
var app = builder.Build();
app.MapGrpcService<WeatherService>();
app.Run();

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31606.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backend", "Backend\Backend.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend", "Frontend\Frontend.csproj", "{78FA5197-1DC8-4057-B314-854F934EBBEE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{78FA5197-1DC8-4057-B314-854F934EBBEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78FA5197-1DC8-4057-B314-854F934EBBEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78FA5197-1DC8-4057-B314-854F934EBBEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78FA5197-1DC8-4057-B314-854F934EBBEE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Backend/Backend.csproj" />
<Project Path="Frontend/Frontend.csproj" />
</Solution>

View File

@ -1,4 +1,4 @@
#region Copyright notice and license
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
@ -24,6 +24,8 @@ namespace Frontend.Balancer
{
public class ConfigurableResolverFactory : ResolverFactory
{
private static readonly BalancerAttributesKey<string> HostOverrideKey = new BalancerAttributesKey<string>("HostOverride");
private readonly ResolverFactory _innerResolverFactory;
private readonly BalancerConfiguration _balancerConfiguration;
@ -101,6 +103,13 @@ namespace Frontend.Balancer
// DNS results change order between refreshes.
// Explicitly order by host to keep result order consistent.
var orderedAddresses = result.Addresses.OrderBy(a => a.EndPoint.Host).ToList();
// Remove host override from addresses so the destination IP address is available.
// The sample does this because the server returns the IP address to the client.
// This makes it clear that gRPC calls are balanced between pods.
foreach (var address in orderedAddresses)
{
((IDictionary<string, object?>)address.Attributes).Remove(HostOverrideKey.Key);
}
_listener(ResolverResult.ForResult(orderedAddresses, serviceConfig, Status.DefaultSuccess));
}
else

View File

@ -0,0 +1,47 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Grpc.Net.Client.Balancer;
namespace Frontend.Balancer
{
public static class ReportingSetup
{
public static void RegisterReportingServices(IServiceCollection services)
{
// These services allow the load balancer policy to be configured and subchannels to be reported in the UI.
services.AddSingleton<SubchannelReporter>();
services.AddSingleton<BalancerConfiguration>();
services.AddSingleton<ResolverFactory>(s =>
{
var inner = new DnsResolverFactory(refreshInterval: TimeSpan.FromSeconds(20));
return new ConfigurableResolverFactory(inner, s.GetRequiredService<BalancerConfiguration>());
});
services.AddSingleton<LoadBalancerFactory>(s =>
{
var inner = new RoundRobinBalancerFactory();
return new ReportingLoadBalancerFactory(inner, s.GetRequiredService<SubchannelReporter>());
});
services.AddSingleton<LoadBalancerFactory>(s =>
{
var inner = new PickFirstBalancerFactory();
return new ReportingLoadBalancerFactory(inner, s.GetRequiredService<SubchannelReporter>());
});
}
}
}

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /app
# Copy everything
@ -8,7 +8,7 @@ RUN dotnet restore examples/Container/Frontend
RUN dotnet publish examples/Container/Frontend -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Frontend.dll"]

View File

@ -1,13 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<!-- Suppress obsolete error in code generated by Razor. -->
<!-- CS0618: 'Router.PreferExactMatches' is obsolete: 'This property is obsolete and configuring it has not effect.' -->
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<PackageReference Include="Grpc.Net.Client" />
<Protobuf Include="..\Proto\weather.proto" GrpcServices="Client" Link="Protos\weather.proto" Access="Internal" />
</ItemGroup>

View File

@ -16,32 +16,48 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Frontend.Balancer;
using Grpc.Core;
using Grpc.Net.Client;
namespace Frontend
var builder = WebApplication.CreateBuilder(args);
builder.Logging.SetMinimumLevel(LogLevel.Trace);
builder.Logging.AddSimpleConsole(c =>
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
c.TimestampFormat = "[HH:mm:ss.ff]";
});
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging =>
{
logging.SetMinimumLevel(LogLevel.Trace);
logging.AddSimpleConsole(c =>
{
c.TimestampFormat = "[HH:mm:ss.ff]";
});
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
builder.Services.AddSingleton(services =>
{
var backendUrl = builder.Configuration["BackendUrl"]!;
var channel = GrpcChannel.ForAddress(backendUrl, new GrpcChannelOptions
{
Credentials = ChannelCredentials.Insecure,
ServiceProvider = services
});
return channel;
});
ReportingSetup.RegisterReportingServices(builder.Services);
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run();

View File

@ -1,114 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System;
using Frontend.Balancer;
using Grpc.Core;
using Grpc.Net.Client;
using Grpc.Net.Client.Balancer;
using Grpc.Net.Client.Configuration;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Frontend
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton(services =>
{
var backendUrl = Configuration["BackendUrl"]!;
var channel = GrpcChannel.ForAddress(backendUrl, new GrpcChannelOptions
{
Credentials = ChannelCredentials.Insecure,
ServiceProvider = services
});
return channel;
});
SetupReportingServices(services);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
private static void SetupReportingServices(IServiceCollection services)
{
// These services allow the load balancer policy to be configured and subchannels to be reported in the UI.
services.AddSingleton<SubchannelReporter>();
services.AddSingleton<BalancerConfiguration>();
services.AddSingleton<ResolverFactory>(s =>
{
var inner = new DnsResolverFactory(refreshInterval: TimeSpan.FromSeconds(20));
return new ConfigurableResolverFactory(inner, s.GetRequiredService<BalancerConfiguration>());
});
services.AddSingleton<LoadBalancerFactory>(s =>
{
var inner = new RoundRobinBalancerFactory();
return new ReportingLoadBalancerFactory(inner, s.GetRequiredService<SubchannelReporter>());
});
services.AddSingleton<LoadBalancerFactory>(s =>
{
var inner = new PickFirstBalancerFactory();
return new ReportingLoadBalancerFactory(inner, s.GetRequiredService<SubchannelReporter>());
});
}
}
}

View File

@ -1,8 +1,8 @@
docker-compose -f .\docker-compose.yml build container-frontend
docker-compose -f .\docker-compose.yml build container-backend
docker compose -f .\docker-compose.yml build container-frontend
docker compose -f .\docker-compose.yml build container-backend
kubectl delete -f .\Kubernetes\deploy-backend.yml
kubectl apply -f .\Kubernetes\deploy-backend.yml
kubectl delete -f .\Kubernetes\deploy-frontend.yml
kubectl apply -f .\Kubernetes\deploy-frontend.yml
kubectl apply -f .\Kubernetes\deploy-frontend.yml

View File

@ -1,4 +1,3 @@
version: '3'
services:
container-frontend:
build:

View File

@ -2,14 +2,14 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\count.proto" GrpcServices="Client" Link="Protos\count.proto" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -16,66 +16,53 @@
#endregion
using System;
using System.Threading.Tasks;
using Count;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Counter.CounterClient(channel);
await UnaryCallExample(client);
await ClientStreamingCallExample(client);
await ServerStreamingCallExample(client);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
static async Task UnaryCallExample(Counter.CounterClient client)
{
public class Program
var reply = await client.IncrementCountAsync(new Empty());
Console.WriteLine("Count: " + reply.Count);
}
static async Task ClientStreamingCallExample(Counter.CounterClient client)
{
using var call = client.AccumulateCount();
for (var i = 0; i < 3; i++)
{
private static readonly Random Random = new Random();
var count = Random.Shared.Next(5);
Console.WriteLine($"Accumulating with {count}");
await call.RequestStream.WriteAsync(new CounterRequest { Count = count });
await Task.Delay(TimeSpan.FromSeconds(2));
}
static async Task Main(string[] args)
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Counter.CounterClient(channel);
await call.RequestStream.CompleteAsync();
await UnaryCallExample(client);
var response = await call;
Console.WriteLine($"Count: {response.Count}");
}
await ClientStreamingCallExample(client);
static async Task ServerStreamingCallExample(Counter.CounterClient client)
{
using var call = client.Countdown(new Empty());
await ServerStreamingCallExample(client);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
private static async Task UnaryCallExample(Counter.CounterClient client)
{
var reply = await client.IncrementCountAsync(new Empty());
Console.WriteLine("Count: " + reply.Count);
}
private static async Task ClientStreamingCallExample(Counter.CounterClient client)
{
using var call = client.AccumulateCount();
for (var i = 0; i < 3; i++)
{
var count = Random.Next(5);
Console.WriteLine($"Accumulating with {count}");
await call.RequestStream.WriteAsync(new CounterRequest { Count = count });
await Task.Delay(TimeSpan.FromSeconds(2));
}
await call.RequestStream.CompleteAsync();
var response = await call;
Console.WriteLine($"Count: {response.Count}");
}
private static async Task ServerStreamingCallExample(Counter.CounterClient client)
{
using var call = client.Countdown(new Empty());
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
Console.WriteLine($"Countdown: {message.Count}");
}
}
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
Console.WriteLine($"Countdown: {message.Count}");
}
}

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.61
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534AC5F8-2DF2-40BD-87A5-B3D8310118C4}.Release|Any CPU.Build.0 = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48A1D3BC-A14B-436A-8822-6DE2BEF8B747}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D22B3129-3BFB-41FA-9FCE-E45EBEF8C2DD}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -16,23 +16,13 @@
#endregion
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Server;
namespace Server
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
builder.Services.AddSingleton<IncrementingCounter>();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
var app = builder.Build();
app.MapGrpcService<CounterService>();
app.Run();

View File

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\count.proto" GrpcServices="Server" Link="Protos\count.proto" />
<PackageReference Include="Grpc.AspNetCore" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.AspNetCore" />
</ItemGroup>
</Project>

View File

@ -1,49 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Server
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddSingleton<IncrementingCounter>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<CounterService>();
});
}
}
}

View File

@ -1,16 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Client" Link="Protos\greet.proto" />
<PackageReference Include="Microsoft.Tye.Extensions.Configuration" Version="$(MicrosoftTyePackageVersion)" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Grpc.Net.Client\Grpc.Net.Client.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,30 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using Greet;
using Grpc.Net.Client;
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Greeter.GreeterClient(channel);
var reply = await client.SayHelloAsync(new HelloRequest { Name = "GreeterClient" });
Console.WriteLine("Greeting: " + reply.Message);
Console.WriteLine("Shutting down");
Console.WriteLine("Press any key to exit...");
Console.ReadKey();

View File

@ -0,0 +1,13 @@
<Solution>
<Folder Name="/ref/">
<Project Path="../../src/Grpc.AspNetCore.Server.ClientFactory/Grpc.AspNetCore.Server.ClientFactory.csproj" />
<Project Path="../../src/Grpc.AspNetCore.Server/Grpc.AspNetCore.Server.csproj" />
<Project Path="../../src/Grpc.AspNetCore/Grpc.AspNetCore.csproj" />
<Project Path="../../src/Grpc.Core.Api/Grpc.Core.Api.csproj" />
<Project Path="../../src/Grpc.Net.Client/Grpc.Net.Client.csproj" />
<Project Path="../../src/Grpc.Net.ClientFactory/Grpc.Net.ClientFactory.csproj" />
<Project Path="../../src/Grpc.Net.Common/Grpc.Net.Common.csproj" />
</Folder>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

View File

@ -16,34 +16,20 @@
#endregion
using Grpc.Core;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Server.Services;
using Server;
namespace Server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
var app = builder.Build();
app.MapGrpcService(services =>
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
var loggerFactory = services.GetRequiredService<ILoggerFactory>();
var service = new GreeterService(loggerFactory);
return Greet.Greeter.BindService(service);
});
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<WeatherService>();
});
}
}
}
app.Run();

View File

@ -0,0 +1,12 @@
{
"profiles": {
"Server": {
"commandName": "Project",
"launchBrowser": false,
"applicationUrl": "https://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\greet.proto" GrpcServices="Server" Link="Protos\greet.proto" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Grpc.AspNetCore\Grpc.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\src\Grpc.AspNetCore.Server\Grpc.AspNetCore.Server.csproj" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
#region Copyright notice and license
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
@ -18,27 +18,24 @@
using System.Threading.Tasks;
using Greet;
using Microsoft.AspNetCore.Mvc;
using Grpc.Core;
using Microsoft.Extensions.Logging;
namespace Frontend.Controllers
namespace Server
{
[Route("api/[controller]")]
[ApiController]
public class GreeterController : ControllerBase
public class GreeterService : Greeter.GreeterBase
{
private readonly Greeter.GreeterClient _client;
private readonly ILogger _logger;
public GreeterController(Greeter.GreeterClient client)
public GreeterService(ILoggerFactory loggerFactory)
{
_client = client;
_logger = loggerFactory.CreateLogger<GreeterService>();
}
[HttpGet("{name}")]
public async Task<ActionResult> SayHello(string name)
public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
{
var reply = await _client.SayHelloAsync(new HelloRequest { Name = name });
return Ok(new { message = reply.Message });
_logger.LogInformation($"Sending hello to {request.Name}");
return Task.FromResult(new HelloReply { Message = "Hello " + request.Name });
}
}
}

View File

@ -2,15 +2,15 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="..\Proto\download.proto" GrpcServices="Client" Link="Protos\download.proto" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Grpc.Net.Client" Version="$(GrpcDotNetPackageVersion)" />
<PackageReference Include="Grpc.Tools" Version="$(GrpcToolsPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
</ItemGroup>
</Project>

View File

@ -20,50 +20,41 @@ using Download;
using Grpc.Core;
using Grpc.Net.Client;
namespace Client
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Downloader.DownloaderClient(channel);
var downloadsPath = Path.Combine(Environment.CurrentDirectory, "downloads");
var downloadId = Path.GetRandomFileName();
var downloadIdPath = Path.Combine(downloadsPath, downloadId);
Directory.CreateDirectory(downloadIdPath);
Console.WriteLine("Starting call");
using var call = client.DownloadFile(new DownloadFileRequest
{
public class Program
Id = downloadId
});
await using var writeStream = File.Create(Path.Combine(downloadIdPath, "data.bin"));
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
if (message.Metadata != null)
{
static async Task Main(string[] args)
{
using var channel = GrpcChannel.ForAddress("https://localhost:5001");
var client = new Downloader.DownloaderClient(channel);
var downloadsPath = Path.Combine(Environment.CurrentDirectory, "downloads");
var downloadId = Path.GetRandomFileName();
var downloadIdPath = Path.Combine(downloadsPath, downloadId);
Directory.CreateDirectory(downloadIdPath);
Console.WriteLine("Starting call");
using var call = client.DownloadFile(new DownloadFileRequest
{
Id = downloadId
});
await using var writeStream = File.Create(Path.Combine(downloadIdPath, "data.bin"));
await foreach (var message in call.ResponseStream.ReadAllAsync())
{
if (message.Metadata != null)
{
Console.WriteLine("Saving metadata to file");
var metadata = message.Metadata.ToString();
await File.WriteAllTextAsync(Path.Combine(downloadIdPath, "metadata.json"), metadata);
}
if (message.Data != null)
{
var bytes = message.Data.Memory;
Console.WriteLine($"Saving {bytes.Length} bytes to file");
await writeStream.WriteAsync(bytes);
}
}
Console.WriteLine();
Console.WriteLine("Files were saved in: " + downloadIdPath);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}
Console.WriteLine("Saving metadata to file");
var metadata = message.Metadata.ToString();
await File.WriteAllTextAsync(Path.Combine(downloadIdPath, "metadata.json"), metadata);
}
if (message.Data != null)
{
var bytes = message.Data.Memory;
Console.WriteLine($"Saving {bytes.Length} bytes to file");
await writeStream.WriteAsync(bytes);
}
}
Console.WriteLine();
Console.WriteLine("Files were saved in: " + downloadIdPath);
Console.WriteLine("Press any key to exit...");
Console.ReadKey();

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{249DA884-CC8F-483C-B1B9-222AB767E722}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csproj", "{7580D422-98F0-441D-B618-DC16A4E2C138}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{249DA884-CC8F-483C-B1B9-222AB767E722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{249DA884-CC8F-483C-B1B9-222AB767E722}.Debug|Any CPU.Build.0 = Debug|Any CPU
{249DA884-CC8F-483C-B1B9-222AB767E722}.Release|Any CPU.ActiveCfg = Release|Any CPU
{249DA884-CC8F-483C-B1B9-222AB767E722}.Release|Any CPU.Build.0 = Release|Any CPU
{7580D422-98F0-441D-B618-DC16A4E2C138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7580D422-98F0-441D-B618-DC16A4E2C138}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7580D422-98F0-441D-B618-DC16A4E2C138}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7580D422-98F0-441D-B618-DC16A4E2C138}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D19E5F88-1F30-4E05-9551-FEFDB3B154EC}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<Solution>
<Project Path="Client/Client.csproj" />
<Project Path="Server/Server.csproj" />
</Solution>

Some files were not shown because too many files have changed in this diff Show More