提交 b6b0b443 编写于 作者: C CyrusNajmabadi

Reorder code.

上级 389e6a19
......@@ -163,30 +163,30 @@ public void Dispose()
}
}
private void DisconnectFromAllTaggers()
private void DisconnectFromTagger(IAccurateTagger<TTag> tagger)
{
this.AssertIsForeground();
foreach (var kvp in _idToProviderAndTagger)
tagger.TagsChanged -= OnUnderlyingTaggerTagsChanged;
var disposable = tagger as IDisposable;
if (disposable != null)
{
var tagger = kvp.Value.Item2;
DisconnectFromTagger(tagger);
disposable.Dispose();
}
_idToProviderAndTagger.Clear();
}
private void DisconnectFromTagger(IAccurateTagger<TTag> tagger)
private void DisconnectFromAllTaggers()
{
this.AssertIsForeground();
tagger.TagsChanged -= OnUnderlyingTaggerTagsChanged;
var disposable = tagger as IDisposable;
if (disposable != null)
foreach (var kvp in _idToProviderAndTagger)
{
disposable.Dispose();
var tagger = kvp.Value.Item2;
DisconnectFromTagger(tagger);
}
_idToProviderAndTagger.Clear();
}
private void RegisterNotification(Action action)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册