.NET gRPC Project
Create the Service
https://github.com/jfcarr/dotnet-iot-tui/tree/main/src/SenseHatGrpcProvider
Steps:
- Create the project, using
grpc
as the project type. - Add a project reference to
SenseHatLib.csproj
- Add .NET IoT bindings.
- Configure the project for remote access (in
launchsettings.json
) - Update the protocol buffer file with sensor-specific request and response messages.
- Implement the service messages.
Service Startup
Open a terminal in the project directory and run:
dotnet run
If you want to start the service and leave it running in the background, add an ampersand to your command:
dotnet run &
Testing
We won't implement a tester as part of this discussion, but if you want to explore this further on your own, here are some options for implementing a gRPC test runner: