コード例 #1
0
 /// <summary>
 /// Sets the <see cref="PropertyState"/> for the selected <see cref="PropertyKey"/>
 /// </summary>
 /// <param name="propKey">The PropertyKey identifying the property for the state change</param>
 /// <param name="state">The new state of the selected property</param>
 public void SetState(PropertyKey propKey, PropertyState state)
 {
     try {
         IPropertyStoreCache cache = (IPropertyStoreCache)_pStore;
         cache.SetState(propKey.MarshalledPointer, (PSC_STATE)state);
     }
     catch (Exception e) {
         throw new NotImplementedException("IPropertyStoreCache is not implemented by this PropertyStore", e);
     }
 }
コード例 #2
0
 /// <summary>
 /// Gets the <see cref="PropertyState"/> for the specified <see cref="PropertyKey"/>
 /// </summary>
 /// <param name="propKey">The PropertyKey identifying the property required</param>
 /// <returns>The state of the requested property</returns>
 public PropertyState GetState(PropertyKey propKey)
 {
     try {
         IPropertyStoreCache cache = (IPropertyStoreCache)_pStore;
         cache.GetState(propKey.MarshalledPointer, out PSC_STATE state);
         return((PropertyState)state);
     }
     catch (Exception e) {
         throw new NotImplementedException("IPropertyStoreCache is not implemented by this PropertyStore", e);
     }
 }