public void SetCallback(IComDaGroupCallback callback)
{
TraceState("SetCallback", callback != null);
ThrowIfDisposed();
lock (m_lock)
{
bool areUpdatesRequired = AreUpdatesRequired;
if (m_callback != null)
{
m_callback.Dispose();
m_callback = null;
}
m_callback = callback;
// resend the contents of the cache.
if (!areUpdatesRequired && AreUpdatesRequired)
{
int cancelId = 0;
Refresh(0, 0, true, out cancelId);
}
CheckUpdateTimerStatus();
}
}