roslyn/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs
/// <summary>
/// The <see cref="VisualStudioWorkspace"/> currently supports only a subset of <see cref="DocumentInfo"/> 
/// changes.
/// </summary>
The  currently supports only a subset of
changes.
The currently supports only a subset of changes .
private void FailIfDocumentInfoChangesNotSupported(CodeAnalysis.Document document, DocumentInfo updatedInfo)
        {
            if (document.SourceCodeKind != updatedInfo.SourceCodeKind)
            {
                throw new InvalidOperationException(
                    $"This Workspace does not support changing a document's {nameof(document.SourceCodeKind)}.");
            }
            if (document.FilePath != updatedInfo.FilePath)
            {
                throw new InvalidOperationException(
                    $"This Workspace does not support changing a document's {nameof(document.FilePath)}.");
            }
            if (document.Id != updatedInfo.Id)
            {
                throw new InvalidOperationException(
                    $"This Workspace does not support changing a document's {nameof(document.Id)}.");
            }
            if (document.Folders != updatedInfo.Folders)
            {
                throw new InvalidOperationException(
                    $"This Workspace does not support changing a document's {nameof(document.Folders)}.");
            }
            if (document.State.Attributes.IsGenerated != updatedInfo.IsGenerated)
            {
                throw new InvalidOperationException(
                    $"This Workspace does not support changing a document's {nameof(document.State.Attributes.IsGenerated)} state.");
            }
        }
private void FailIfDocumentInfoChangesNotSupported ( CodeAnalysis . Document document , DocumentInfo updatedInfo ) { if ( document . SourceCodeKind != updatedInfo . SourceCodeKind ) { throw new InvalidOperationException ( $" This Workspace does not support changing a document's  { nameof ( document . SourceCodeKind ) } . " ) ; } if ( document . FilePath != updatedInfo . FilePath ) { throw new InvalidOperationException ( $" This Workspace does not support changing a document's  { nameof ( document . FilePath ) } . " ) ; } if ( document . Id != updatedInfo . Id ) { throw new InvalidOperationException ( $" This Workspace does not support changing a document's  { nameof ( document . Id ) } . " ) ; } if ( document . Folders != updatedInfo . Folders ) { throw new InvalidOperationException ( $" This Workspace does not support changing a document's  { nameof ( document . Folders ) } . " ) ; } if ( document . State . Attributes . IsGenerated != updatedInfo . IsGenerated ) { throw new InvalidOperationException ( $" This Workspace does not support changing a document's  { nameof ( document . State . Attributes . IsGenerated ) }  state. " ) ; } }
The  currently supports only a subset of
changes.
The currently supports only a subset of changes .
document
CodeAnalysis.Document
updatedInfo
DocumentInfo