public static AdapterInterface CreateOffControl(Action switchOffAction)
{
var iface = new AdapterInterface("org.alljoyn.SmartSpaces.Operation.OffControl");
iface.Properties.Add(new AdapterAttribute("Version", (ushort)1) { COVBehavior = SignalBehavior.Never });
iface.Properties[0].Annotations.Add("org.alljoyn.Bus.DocString.En", "The interface version");
var m = new AdapterMethod("SwitchOff", "Switch off the device.", (sender, input, output) =>
{
switchOffAction();
});
iface.Methods.Add(m);
return iface;
}