protected void AddDocument(HostProject hostProject, string filePath, string relativeFilePath) { ProjectSnapshotManagerDispatcher.AssertDispatcherThread(); if (_currentDocuments.ContainsKey(filePath)) { return; } var hostDocument = new HostDocument(filePath, relativeFilePath); _projectSnapshotManager.DocumentAdded(hostProject, hostDocument, new FileTextLoader(filePath, defaultEncoding: null)); _currentDocuments[filePath] = hostDocument; }