What is the correct way to get the command (method) name from an offline command?

Andrew Batta 21 Reputation points
2022-12-05T14:59:59.76+00:00

What is the correct way to get the command (mehtod) name from an offline command?

I'm able to find the method-name value in the properties dictionary of the Message object, but is that the only way to get the type of command? Will that key value always be present in offline commands?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
364 questions
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,271 Reputation points
    2023-01-25T15:36:19.4166667+00:00

    Hello @Andrew Batta ,
    I think those properties will always contain the KeyValue pair for the Method name.
    Did you by any chance see missing property for Method Name?
    Offline commands
    Yes, method-name command is the way to go!

    User's image

    Please comment in the below section to send us an email if you need further help in this matter! Happy to help!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.