public void NotifyOnDocumentClosing(string moniker)
 {
     if (_openedDocs.TryGetValue(moniker, out DocumentId id))
     {
         // check if the doc is part of the current Roslyn workspace before notifying Roslyn.
         if (CurrentSolution.ContainsProject(id.ProjectId))
         {
             OnDocumentClosed(id, new FileTextLoaderNoException(moniker, null));
             _openedDocs = _openedDocs.Remove(moniker);
         }
     }
 }
Ejemplo n.º 2
0
        async void OnProjectModified(object sender, MonoDevelop.Projects.SolutionItemModifiedEventArgs args)
        {
            if (internalChanges)
            {
                return;
            }
            if (!args.Any(x => x.Hint == "TargetFramework" || x.Hint == "References"))
            {
                return;
            }
            var project   = (MonoDevelop.Projects.Project)sender;
            var projectId = GetProjectId(project);

            if (CurrentSolution.ContainsProject(projectId))
            {
                OnProjectReloaded(await LoadProject(project, default(CancellationToken)).ConfigureAwait(false));
            }
        }