Exemplo n.º 1
0
        protected void UpdateProjectUnsafe(HostProject project)
        {
            var projectManager = GetProjectManager();

            if (Current == null && project == null)
            {
                // This is a no-op. This project isn't using Razor.
            }
            else if (Current == null && project != null)
            {
                projectManager.ProjectAdded(project);
            }
            else if (Current != null && project == null)
            {
                Debug.Assert(_currentDocuments.Count == 0);
                projectManager.ProjectRemoved(Current);
                _razorProjectChangePublisher.RemovePublishFilePath(Current.FilePath);
            }
            else
            {
                projectManager.ProjectConfigurationChanged(project);
            }

            Current = project;
        }