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

SetPropertyString() protected method

Utility function which updates the value of a PropertyString. (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. Throws ParameterValidationError if the property has a range of allowed values and the new value is not in this range
protected SetPropertyString ( PropertyString aProperty, String aValue ) : bool
aProperty OpenHome.Net.Core.PropertyString Property to be updated
aValue String New value for the property
return bool
        protected bool SetPropertyString(PropertyString aProperty, String aValue)
        {
            uint changed;
            IntPtr value = InteropUtils.StringToHGlobalUtf8(aValue);
            int err = DvProviderSetPropertyString(iHandle, aProperty.Handle(), value, out changed);
            Marshal.FreeHGlobal(value);
            if (err != 0)
            {
                throw new PropertyUpdateError();
            }
            return (changed != 0);
        }