CacheItemPolicy.ChangeMonitors 属性

定义

获取与某个缓存项关联的 ChangeMonitor 对象的集合。Gets a collection of ChangeMonitor objects that are associated with a cache entry.

public:
 property System::Collections::ObjectModel::Collection<System::Runtime::Caching::ChangeMonitor ^> ^ ChangeMonitors { System::Collections::ObjectModel::Collection<System::Runtime::Caching::ChangeMonitor ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Runtime.Caching.ChangeMonitor> ChangeMonitors { get; }
member this.ChangeMonitors : System.Collections.ObjectModel.Collection<System.Runtime.Caching.ChangeMonitor>
Public ReadOnly Property ChangeMonitors As Collection(Of ChangeMonitor)

属性值

Collection<ChangeMonitor>

更改监视器的集合。A collection of change monitors. 默认值为空集合。The default is an empty collection.

注解

可以添加或删除与某个缓存项关联的更改监视器。You can add to or remove change monitors that are associated with a cache entry. 但是,必须先完成更改监视器集,然后才能将实例传递 CacheItemPolicyObjectCache 实现。However, the set of change monitors must be complete before you pass a CacheItemPolicy instance to an ObjectCache implementation. 如果在 CacheItemPolicy 对象传递到实现后更改对象的更改监视器集 CacheItemPolicy ObjectCache ,则这些更改不起作用。If you change the set of change monitors on a CacheItemPolicy object after the CacheItemPolicy object has been passed to an ObjectCache implementation, the changes have no effect.

适用于