Ejemplo n.º 1
0
        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;
        }