Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
Grpc/ | 12-May-2024 | - | 28 | 24 | ||
Grpc.Auth/ | 12-May-2024 | - | 269 | 142 | ||
Grpc.Core/ | 12-May-2024 | - | 14,629 | 9,525 | ||
Grpc.Core.Api/ | 12-May-2024 | - | 5,714 | 2,429 | ||
Grpc.Core.NativeDebug/ | 12-May-2024 | - | 42 | 38 | ||
Grpc.Core.Testing/ | 12-May-2024 | - | 266 | 161 | ||
Grpc.Core.Tests/ | 12-May-2024 | - | 7,430 | 5,386 | ||
Grpc.Core.Xamarin/ | 12-May-2024 | - | 129 | 98 | ||
Grpc.Examples/ | 12-May-2024 | - | 1,626 | 1,237 | ||
Grpc.Examples.MathClient/ | 12-May-2024 | - | 98 | 53 | ||
Grpc.Examples.MathServer/ | 12-May-2024 | - | 101 | 57 | ||
Grpc.Examples.Tests/ | 12-May-2024 | - | 432 | 286 | ||
Grpc.HealthCheck/ | 12-May-2024 | - | 1,073 | 718 | ||
Grpc.HealthCheck.Tests/ | 12-May-2024 | - | 582 | 382 | ||
Grpc.IntegrationTesting/ | 12-May-2024 | - | 25,526 | 20,647 | ||
Grpc.IntegrationTesting.Client/ | 12-May-2024 | - | 88 | 45 | ||
Grpc.IntegrationTesting.QpsWorker/ | 12-May-2024 | - | 89 | 46 | ||
Grpc.IntegrationTesting.Server/ | 12-May-2024 | - | 87 | 44 | ||
Grpc.IntegrationTesting.StressClient/ | 12-May-2024 | - | 87 | 44 | ||
Grpc.IntegrationTesting.XdsClient/ | 12-May-2024 | - | 88 | 45 | ||
Grpc.Microbenchmarks/ | 12-May-2024 | - | 912 | 592 | ||
Grpc.Reflection/ | 12-May-2024 | - | 2,700 | 2,199 | ||
Grpc.Reflection.Tests/ | 12-May-2024 | - | 292 | 190 | ||
Grpc.Tools/ | 12-May-2024 | - | 2,281 | 1,387 | ||
Grpc.Tools.Tests/ | 12-May-2024 | - | 1,142 | 819 | ||
build/ | 12-May-2024 | - | 33 | 26 | ||
doc/ | 12-May-2024 | - | ||||
docfx/ | 12-May-2024 | - | 114 | 76 | ||
experimental/ | 12-May-2024 | - | 163 | 81 | ||
ext/ | 12-May-2024 | - | 1,323 | 1,025 | ||
keys/ | 12-May-2024 | - | 9 | 8 | ||
unitypackage/ | 12-May-2024 | - | 2,233 | 2,154 | ||
.editorconfig | D | 12-May-2024 | 1.3 KiB | 32 | 30 | |
.gitignore | D | 12-May-2024 | 176 | 18 | 16 | |
BUILD-INTEGRATION.md | D | 12-May-2024 | 17.7 KiB | 378 | 300 | |
Directory.Build.props | D | 12-May-2024 | 110 | 4 | 4 | |
Directory.Build.targets | D | 12-May-2024 | 392 | 9 | 9 | |
Grpc.sln | D | 12-May-2024 | 13 KiB | 170 | 168 | |
README.md | D | 12-May-2024 | 5.4 KiB | 130 | 85 | |
Settings.StyleCop | D | 12-May-2024 | 19.2 KiB | 509 | 509 | |
build_nuget.sh | D | 12-May-2024 | 2.2 KiB | 55 | 23 | |
build_packages_dotnetcli.bat | D | 12-May-2024 | 2.6 KiB | 58 | 45 | |
build_unitypackage.bat | D | 12-May-2024 | 5.6 KiB | 86 | 69 | |
build_unitypackage.sh | D | 12-May-2024 | 4.8 KiB | 81 | 35 | |
expand_dev_version.sh | D | 12-May-2024 | 948 | 26 | 4 | |
generate_proto_csharp.sh | D | 12-May-2024 | 2.2 KiB | 49 | 19 | |
install_dotnet_sdk.ps1 | D | 12-May-2024 | 701 | 23 | 13 | |
tests.json | D | 12-May-2024 | 3.8 KiB | 92 | 91 |
README.md
1[](http://www.nuget.org/packages/Grpc/) 2gRPC C# 3======= 4 5A C# implementation of gRPC based on the native gRPC Core library. 6 7There are currently two official implementations of gRPC for C# 8 9- The original gRPC C# implementation based on the native gRPC Core library (the source code lives in this directory) 10- The new "gRPC for .NET" implementation written in pure C# and based on the newly released .NET Core 3 (source code available at https://github.com/grpc/grpc-dotnet) 11 12The implementations are meant to coexist side-by-side and each has its own advantages in terms of available features, integrations, supported platforms, maturity level and performance. 13They share the same API for invoking and handling RPCs, thus limiting the lock-in and enabling users to choose the implementation that satisfies their needs the best 14(and perhaps adjust their choice over time without needing to do too much refactoring). 15 16The following documentation is for the original gRPC C# implementation only (the `Grpc.Core` nuget package). 17 18SUPPORTED PLATFORMS 19------------------ 20 21- [.NET Core](https://dotnet.github.io/) on Linux, Windows and Mac OS X 22- .NET Framework 4.5+ (Windows) 23- Mono 4+ on Linux, Windows and Mac OS X 24 25PREREQUISITES 26-------------- 27 28When using gRPC C# under .NET Core you only need to [install .NET Core](https://www.microsoft.com/net/core). 29 30In addition to that, you can also use gRPC C# with these runtimes / IDEs 31- Windows: .NET Framework 4.5+, Visual Studio 2013 or newer, Visual Studio Code 32- Linux: Mono 4+, Visual Studio Code 33- Mac OS X: Mono 4+, Visual Studio Code, Visual Studio for Mac 34 35HOW TO USE 36-------------- 37 38**Windows, Linux, Mac OS X** 39 40- Open Visual Studio and start a new project/solution (alternatively, you can create a new project from command line with `dotnet` SDK) 41 42- Add the [Grpc](https://www.nuget.org/packages/Grpc/) NuGet package as a dependency (Project options -> Manage NuGet Packages). 43 44- To be able to generate code from Protocol Buffer (`.proto`) file definitions, add the [Grpc.Tools](https://www.nuget.org/packages/Grpc.Tools/) NuGet package which provides [code generation integrated into your build](BUILD-INTEGRATION.md). 45 46**Xamarin.Android and Xamarin.iOS (Experimental only)** 47 48See [Experimentally supported platforms](experimental) for instructions. 49 50**Unity (Experimental only)** 51 52See [Experimentally supported platforms](experimental) for instructions. 53 54NUGET DEVELOPMENT FEED (NIGHTLY BUILDS) 55-------------- 56 57In production, you should use officially released stable packages available on http://nuget.org, but if you want to test the newest upstream bug fixes and features early, you can use the development nuget feed where new nuget builds are uploaded nightly. 58 59Feed URL (NuGet v2): https://grpc.jfrog.io/grpc/api/nuget/grpc-nuget-dev 60 61Feed URL (NuGet v3): https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev 62 63The same development nuget packages and packages for other languages can also be found at https://packages.grpc.io/ 64 65BUILD FROM SOURCE 66----------------- 67 68You only need to go through these steps if you are planning to develop gRPC C#. 69If you are a user of gRPC C#, go to Usage section above. 70 71**Prerequisites for contributors** 72 73- [dotnet SDK](https://www.microsoft.com/net/core) 74- [Mono 4+](https://www.mono-project.com/) (only needed for Linux and MacOS) 75- Prerequisites mentioned in [BUILDING.md](../../BUILDING.md#pre-requisites) 76 to be able to compile the native code. 77 78**Windows, Linux or Mac OS X** 79 80- The easiest way to build is using the `run_tests.py` script that will take care of building the `grpc_csharp_ext` native library. 81 82 ``` 83 # NOTE: make sure all necessary git submodules with dependencies 84 # are available by running "git submodule update --init" 85 86 # from the gRPC repository root 87 $ python tools/run_tests/run_tests.py -l csharp -c dbg --build_only 88 ``` 89 90- Use Visual Studio 2017 (on Windows) to open the solution `Grpc.sln` or use Visual Studio Code with C# extension (on Linux and Mac). gRPC C# code has been migrated to 91 dotnet SDK `.csproj` projects that are much simpler to maintain, but are not yet supported by Xamarin Studio or Monodevelop (the NuGet packages still 92 support both `net45` and `netstandard` and can be used in all IDEs). 93 94RUNNING TESTS 95------------- 96 97gRPC C# is using NUnit as the testing framework. 98 99Under Visual Studio, make sure NUnit test adapter is installed (under "Extensions and Updates"). 100Then you should be able to run all the tests using Test Explorer. 101 102gRPC team uses a Python script to facilitate running tests for 103different languages. 104 105``` 106# from the gRPC repository root 107$ python tools/run_tests/run_tests.py -l csharp -c dbg 108``` 109 110DOCUMENTATION 111------------- 112- [.NET Build Integration](BUILD-INTEGRATION.md) 113- [API Reference][] 114- [Helloworld Example][] 115- [RouteGuide Tutorial][] 116 117PERFORMANCE 118----------- 119 120For best gRPC C# performance, use [.NET Core](https://dotnet.github.io/) and the Server GC mode `"System.GC.Server": true` for your applications. 121 122THE NATIVE DEPENDENCY 123--------------- 124 125Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. The fact that a native library is used should be fully transparent to the users and just installing the `Grpc.Core` NuGet package is the only step needed to use gRPC C# on all supported platforms. 126 127[API Reference]: https://grpc.io/grpc/csharp/api/Grpc.Core.html 128[Helloworld Example]: ../../examples/csharp/Helloworld 129[RouteGuide Tutorial]: https://grpc.io/docs/languages/csharp/basics 130