src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Editor/ProjectFileEditorPresenter.cs
/// <summary>
/// Schedules the project file to be updated. This is called by the ProjectFileModelWatcher, which is within a Project write lock.
/// Because of the time-sensitive nature of that lock, instead of updating the file immediately we schedule an update as soon
/// as the JTF can run our code.
/// </summary>
Schedules the project file to be updated. This is called by the ProjectFileModelWatcher, which is within a Project write lock.
Because of the time-sensitive nature of that lock, instead of updating the file immediately we schedule an update as soon
as the JTF can run our code.
Schedules the project file to be updated . This is called by the ProjectFileModelWatcher which is within a Project write lock . Because of the time - sensitive nature of that lock instead of updating the file immediately we schedule an update as soon as the JTF can run our code .
public JoinableTask ScheduleProjectFileUpdate()
        {
            lock (_lock)
            {
                if (_currentState == EditorState.WritingProjectFile ||
                    _currentState == EditorState.NoEditor ||
                    _currentState == EditorState.EditorClosing)
                {
                    return null;
                }
                _currentState = EditorState.BufferUpdateScheduled;
                return _threadingService.JoinableTaskFactory.RunAsync(UpdateProjectFileAsync);
            }
        }
public JoinableTask ScheduleProjectFileUpdate ( ) { lock ( _lock ) { if ( _currentState == EditorState . WritingProjectFile || _currentState == EditorState . NoEditor || _currentState == EditorState . EditorClosing ) { return null ; } _currentState = EditorState . BufferUpdateScheduled ; return _threadingService . JoinableTaskFactory . RunAsync ( UpdateProjectFileAsync ) ; } }
Schedules the project file to be updated.
Schedules the project file to be updated .
// If the current state is writing project file, we don't want to update now, as the project will not have been fully // reloaded yet. We'll get called back again after the ProjectReloadManager is finished reloading the project. // Additionally, if there is no editor open, or if the editor is closing, don't schedule an update