public void SetEnabled(bool enabled)
{
TraceState("SetEnabled", enabled);
ThrowIfDisposed();
lock (m_lock)
{
bool areUpdatesRequired = AreUpdatesRequired;
m_enabled = enabled;
// resend the contents of the cache.
if (!areUpdatesRequired && AreUpdatesRequired)
{
int cancelId = 0;
Refresh(0, 0, true, out cancelId);
}
CheckUpdateTimerStatus();
}
}