提交 fdc50499 编写于 作者: R Ravi Chande

Merge pull request #793 from rchande/ProjectReloadPerf

Fix KeyNotFoundException
......@@ -54,26 +54,28 @@ private void SolutionOpeningContextChanged(object sender, UIContextChangedEventA
private void ContextChangedWorker(UIContextChangedEventArgs e, string operation)
{
if (_notificationService != null)
if (_notificationService == null)
{
var globalOperation = _operations[operation];
if (e.Activated)
{
if (globalOperation != null)
{
globalOperation.Dispose();
}
return;
}
TryCancelPendingNotification(operation);
_operations[operation] = _notificationService.Start(operation);
if (e.Activated)
{
_operations[operation] = _notificationService.Start(operation);
}
}
}
else if (globalOperation != null)
{
globalOperation.Done();
globalOperation.Dispose();
globalOperation = null;
}
private void TryCancelPendingNotification(string operation)
{
GlobalOperationRegistration globalOperation;
if (_operations.TryGetValue(operation, out globalOperation))
{
globalOperation.Done();
globalOperation.Dispose();
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册