1 write to Attributes
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextDocumentState.cs (1)
47Attributes = attributes;
60 references to Attributes
Microsoft.CodeAnalysis.Features (9)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
264if (document.State.Attributes.IsGenerated)
EditAndContinue\CommittedSolution.cs (2)
278isGenerated: document.State.Attributes.IsGenerated) 279.WithDesignTimeOnly(document.State.Attributes.DesignTimeOnly)
EditAndContinue\EditSession.cs (4)
345if (document.State.Attributes.DesignTimeOnly) 366if (document.State.Attributes.DesignTimeOnly) 438if (newState.Attributes.DesignTimeOnly) 449if (newState.Attributes.DesignTimeOnly)
EditAndContinue\Extensions.cs (1)
82if (textDocumentState.Attributes.DesignTimeOnly)
Workspace\CompileTimeSolutionProvider.cs (1)
114if (documentState.Attributes.DesignTimeOnly || IsRazorDesignTimeDocument(documentState))
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.SolutionCreator.cs (7)
477Contract.ThrowIfFalse(document.State.Attributes.Id == newDocumentInfo.Id); 478Contract.ThrowIfFalse(document.State.Attributes.Name == newDocumentInfo.Name); 479Contract.ThrowIfFalse(document.State.Attributes.FilePath == newDocumentInfo.FilePath); 480Contract.ThrowIfFalse(document.State.Attributes.IsGenerated == newDocumentInfo.IsGenerated); 481Contract.ThrowIfFalse(document.State.Attributes.DesignTimeOnly == newDocumentInfo.DesignTimeOnly); 483if (document.State.Attributes.Folders != newDocumentInfo.Folders) 490if (document.State.Attributes.SourceCodeKind != newDocumentInfo.SourceCodeKind)
Microsoft.CodeAnalysis.Workspaces (38)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
482var attributes = w.CurrentSolution.GetRequiredDocument(documentId).State.Attributes;
Workspace\Solution\AdditionalDocumentState.cs (1)
52this.Attributes,
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
64this.Attributes,
Workspace\Solution\DocumentState.cs (16)
95=> ParseOptions == null ? Attributes.SourceCodeKind : ParseOptions.Kind; 98=> Attributes.IsGenerated; 310Attributes.SyntaxTreeFilePath, 317Attributes, 367newTree = treeFactory.CreateSyntaxTree(Attributes.SyntaxTreeFilePath, options, existingTree.Encoding, LoadTextOptions.ChecksumAlgorithm, existingRoot); 378Attributes.SyntaxTreeFilePath, 385Attributes.With(sourceCodeKind: options.Kind), 405=> UpdateAttributes(Attributes.With(name: name)); 408=> UpdateAttributes(Attributes.With(folders: folders)); 412Debug.Assert(attributes != Attributes); 426var newAttributes = Attributes.With(filePath: filePath); 427Debug.Assert(newAttributes != Attributes); 475Attributes.SyntaxTreeFilePath, 484Attributes, 522var (text, treeAndVersion) = CreateTreeWithLazyText(newRoot, newTextVersion, newTreeVersion, encoding, LoadTextOptions.ChecksumAlgorithm, Attributes, _options, syntaxTreeFactory); 527Attributes,
Workspace\Solution\DocumentState_LinkedFileReuse.cs (3)
29Attributes, 48var filePath = this.Attributes.SyntaxTreeFilePath; 61Attributes,
Workspace\Solution\SolutionState.CompilationAndGeneratorDriverTranslationAction_Actions.cs (1)
37public DocumentId DocumentId => _newState.Attributes.Id;
Workspace\Solution\SolutionState.CompilationTracker.cs (1)
844if (documentState.Value.Attributes.DesignTimeOnly)
Workspace\Solution\SolutionState.cs (1)
1218if (oldDocument.Attributes.Name == name)
Workspace\Solution\StateChecksums.cs (1)
241result[Info] = state.Attributes;
Workspace\Solution\TextDocumentState.cs (7)
69public DocumentId Id => Attributes.Id; 70public string? FilePath => Attributes.FilePath; 71public IReadOnlyList<string> Folders => Attributes.Folders; 72public string Name => Attributes.Name; 208this.Attributes, 258=> oldState.Attributes != Attributes;
Workspace\Solution\TextDocumentState_Checksum.cs (1)
41var infoChecksum = serializer.CreateChecksum(Attributes, cancellationToken);
Workspace\Workspace.cs (4)
889var oldAttributes = oldSolution.GetDocument(documentId)!.State.Attributes; 1742new DocumentInfo(newDoc.State.Attributes, loader: null, documentServiceProvider: newDoc.State.Services)); 1781isGenerated: doc.State.Attributes.IsGenerated) 1782.WithDesignTimeOnly(doc.State.Attributes.DesignTimeOnly)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
SolutionTests\SolutionTests.cs (4)
1756Assert.False(document.State.Attributes.IsGenerated); 1784Assert.True(document.State.Attributes.IsGenerated); 1813Assert.False(document2.State.Attributes.IsGenerated); 1849Assert.False(document2.State.Attributes.IsGenerated);
Microsoft.VisualStudio.LanguageServices (2)
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
1251if (document.State.Attributes.IsGenerated != updatedInfo.IsGenerated) 1254$"This Workspace does not support changing a document's {nameof(document.State.Attributes.IsGenerated)} state.");