OpenHome.Net.Device.DvProvider.SetPropertyBool C# (CSharp) Method

SetPropertyBool() protected method

Utility function which updates the value of a PropertyBool. (Not intended for external use)
If the property value has changed and the properties are not locked (PropertiesLock() called more recently than PropertiesUnlock()), publication of an update is scheduled
protected SetPropertyBool ( PropertyBool aProperty, bool aValue ) : bool
aProperty OpenHome.Net.Core.PropertyBool Property to be updated
aValue bool New value for the property
return bool
        protected bool SetPropertyBool(PropertyBool aProperty, bool aValue)
        {
            uint changed;
            uint val = (aValue ? 1u : 0u);
            int err = DvProviderSetPropertyBool(iHandle, aProperty.Handle(), val, out changed);
            if (err != 0)
            {
                throw new PropertyUpdateError();
            }
            return (changed != 0);
        }