Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 internal PropertyStoreProperty(PropertyKey key, PropVariant value)
 {
     propertyKey = key;
     propertyValue = value;
 }
Ejemplo n.º 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;
     }
 }