public object this[PropertyKey key]
        {
            get
            {
                if (_properties.ContainsKey(key))
                    return _properties[key];

                return null;
            }
            set
            {
                if (Mode == AccessMode.Read)
                    return;

                SetValue(key, value);
            }
        }
        /// <summary>
        ///     Sets property value of the property
        /// </summary>
        /// <returns>Property value</returns>
        public void SetValue(PropertyKey key, object value)
        {
            ComThread.Assert();

            if (Mode == AccessMode.Read)
                return;

            if (!Contains(key))
                return;

            Marshal.ThrowExceptionForHR(_propertyStoreInteface.SetValue(ref key, ref value));
            _propertyStoreInteface.Commit();
        }
 public bool Contains(PropertyKey key)
 {
     return _properties.ContainsKey(key);
 }
예제 #4
0
 public void OnPropertyValueChanged(string pwstrDeviceId, PropertyKey key)
 {
     var inner = GetInner();
     if(inner != null)
         inner.OnPropertyValueChanged(pwstrDeviceId, key);
 }
예제 #5
0
 public bool Contains(PropertyKey key)
 {
     return(_properties.ContainsKey(key));
 }
예제 #6
0
 void ISystemAudioEventClient.OnPropertyValueChanged(string deviceId, PropertyKey key)
 {
     RaiseAudioDeviceChanged(new AudioDeviceChangedEventArgs(GetDevice(CoreAudioDevice.SystemIdToGuid(deviceId)),
                                                             AudioDeviceEventType.PropertyChanged));
 }