AdapterLib.MockOnOffSwitchDevice.CreateOffInterface C# (CSharp) Method

CreateOffInterface() private method

private CreateOffInterface ( bool currentValue ) : AdapterInterface
currentValue bool
return AdapterInterface
        private AdapterInterface CreateOffInterface(bool currentValue)
        {
            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) =>
            {
                OnOff = false;
            });
            iface.Methods.Add(m);
            return iface;
        }