-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added sample for Edge Module direct method #3087
Conversation
You may also want to add the sample link here https://github.com/Azure/azure-iot-sdk-csharp/tree/previews/v2/iothub/device/samples#device-samples |
iothub/device/samples/getting started/EdgeModuleMethodSample/Program.cs
Outdated
Show resolved
Hide resolved
public class EdgeModuleMethodSample | ||
{ | ||
private readonly IotHubModuleClient _moduleClient; | ||
private string _deviceId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we not making deviceId and moduleId configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to avoid asking more than necessary parameters from the user.
|
||
case "WriteToConsole": | ||
case "ModuleToModule": | ||
return await WriteToConsoleAsync(directMethodRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ModuleToModule necessary if it just writes to console?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to distinguish between the two, since 'WriteToConsole' method prints out the method name.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Added EdgeModuleMethodSample.
This sample allows you to receive direct methods on Edge module from Azure portal and also from Edge module itself.
Also, updated repo for EdgeModuleMessageSample