Looks ok, though this code can be called on arbitrary thread and AFAIR `TextDocument` implementation is not thread safe. For the sake of correctness `OpenDocumentTracker` might also store `Encoding` in addition to `ITextSnapshot`