On the coronary heart of an App Motion is the idea of an entity. These are the objects handed to Actions and returned from them, issues like easy variables, extra advanced units of outcomes, or paperwork, photographs, or textual content. Entities are JSON objects, so you should utilize acquainted methods to construct and ship App Actions, and Home windows will embody new APIs in WinRT prepared that will help you shortly add entity assist to your code. It’s presently supported by a preview launch of the Home windows SDK, which it’s worthwhile to declare as a part of your venture.
Constructing an App Motion begins with the entity JSON, which defines how the motion is described in an agent builder, adopted by inputs and outputs, after which the way it’s invoked, for instance by way of a COM GUID. You do want to jot down the correct handlers in your code to work with the motion, utilizing an Motion Supplier class, which implements an asynchronous interface. Your supplier makes use of the identify outlined within the App Motion JSON to route inputs to the correct code, sending a response again when the motion has accomplished.
Microsoft has an App Actions Playground to check your actions. As soon as they’re registered with Home windows, you’re capable of see them within the playground. You possibly can then ship the enter entities, utilizing the playground to see the appliance response. Purposes can then set the supply of their actions, for instance, toggling them on and off once you launch and shut down your code. This ensures that purposes and brokers solely run underneath consumer management.