예제 #1
0
 /// <summary>
 /// Contains property guid
 /// </summary>
 /// <param name="key">Looks for a specific key</param>
 /// <returns>True if found</returns>
 public bool Contains(PropertyKey key)
 {
     for (int i = 0; i < Count; i++)
     {
         PropertyKey ikey = Get(i);
         if ((ikey.formatId == key.formatId) && (ikey.propertyId == key.propertyId))
         {
             return true;
         }
     }
     return false;
 }
예제 #2
0
 internal PropertyStoreProperty(PropertyKey key, PropVariant value)
 {
     propertyKey = key;
     propertyValue = value;
 }
예제 #3
0
 /// <summary>
 /// Indexer by guid
 /// </summary>
 /// <param name="key">Property Key</param>
 /// <returns>Property or null if not found</returns>
 public PropertyStoreProperty this[PropertyKey key]
 {
     get
     {
         PropVariant result;
         for (int i = 0; i < Count; i++)
         {
             PropertyKey ikey = Get(i);
             if ((ikey.formatId == key.formatId) && (ikey.propertyId == key.propertyId))
             {
                 Marshal.ThrowExceptionForHR(storeInterface.GetValue(ref ikey, out result));
                 return new PropertyStoreProperty(ikey, result);
             }
         }
         return null;
     }
 }
예제 #4
0
 public void OnPropertyValueChanged(string pwstrDeviceId, NAudio.CoreAudioApi.PropertyKey key)
 {
     Trace.WriteLine("OnPropertyValueChanged:" + pwstrDeviceId + " key:" + key);
 }
예제 #5
0
 /// <summary>
 /// Sets property value at specified key.
 /// </summary>
 /// <param name="key">Key of property to set.</param>
 /// <param name="value">Value to write.</param>
 public void SetValue(PropertyKey key, PropVariant value)
 {
     Marshal.ThrowExceptionForHR(storeInterface.SetValue(ref key, ref value));
 }
예제 #6
0
 internal PropertyStoreProperty(PropertyKey key, PropVariant value)
 {
     this.propertyKey   = key;
     this.propertyValue = value;
 }
예제 #7
0
 void IMMNotificationClient.OnPropertyValueChanged(string deviceId, PropertyKey propertyKey)
 {
     Debug.WriteLine("OnPropertyValueChanged:  formatId --> {0}  propertyId--> {1}", propertyKey.formatId.ToString(), propertyKey.propertyId.ToString());
 }