![Avatar](https://secure.gravatar.com/avatar/bc61f0b04a404579830ee91c72458904.jpg?s=64&d=identicon&r=g)
I implemented a diagnostic tagger class by inheriting CollectionTagger<ISquiggleTag> and IDisposable.
Then register it through syntaxEditor.Document.Language.RegisterService(tagger).
In the obtained service, I can see that my tagger is only registered once.
But when I unregister service, tagger.Dispose() will be called twice. Is this normal?
This is the code to unregister service:
var types = syntaxEditor.Document.Language.GetAllServiceTypes();
foreach (var type in types)
{
syntaxEditor.Document.Language.UnregisterService(type);
}
It will be called more times in the actual project, I don’t quite understand what caused it.