1 write to Attributes
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\TextDocumentState.cs (1)
36Attributes = attributes;
65 references to Attributes
Microsoft.CodeAnalysis.Features (8)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
253if (document.State.Attributes.IsGenerated)
EditAndContinue\CommittedSolution.cs (2)
308isGenerated: document.State.Attributes.IsGenerated) 309.WithDesignTimeOnly(document.State.Attributes.DesignTimeOnly)
EditAndContinue\EditSession.cs (3)
455if (newState.Attributes.DesignTimeOnly) 466if (newState.Attributes.DesignTimeOnly) 477if (oldState.Attributes.DesignTimeOnly)
EditAndContinue\Utilities\Extensions.cs (1)
82if (textDocumentState.Attributes.DesignTimeOnly)
Workspace\CompileTimeSolutionProvider.cs (1)
121if (documentState.Attributes.DesignTimeOnly || IsRazorDesignTimeDocument(documentState))
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerWorkspace.cs (1)
114if (document is not null && (document.DocumentState.Attributes.DesignTimeOnly || !PathUtilities.IsAbsolute(filePath)))
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (2)
93if (oldDocument?.State.Attributes.Checksum == newDocument.State.Attributes.Checksum)
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.SolutionCreator.cs (7)
574Contract.ThrowIfFalse(document.State.Attributes.Id == newDocumentInfo.Id); 575Contract.ThrowIfFalse(document.State.Attributes.IsGenerated == newDocumentInfo.IsGenerated); 576Contract.ThrowIfFalse(document.State.Attributes.DesignTimeOnly == newDocumentInfo.DesignTimeOnly); 578if (document.State.Attributes.Name != newDocumentInfo.Name) 581if (document.State.Attributes.FilePath != newDocumentInfo.FilePath) 584if (document.State.Attributes.Folders != newDocumentInfo.Folders) 591if (document.State.Attributes.SourceCodeKind != newDocumentInfo.SourceCodeKind)
Microsoft.CodeAnalysis.Workspaces (41)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
511var documentInfo = new DocumentInfo(documentToReload.State.Attributes, fileInfo.TextLoader, fileInfo.DocumentServiceProvider);
Workspace\Solution\AdditionalDocumentState.cs (2)
46Attributes, 64this.Attributes,
Workspace\Solution\AnalyzerConfigDocumentState.cs (3)
48Attributes.FilePath == newAttributes.FilePath ? _lazyAnalyzerConfig : null); 54Attributes, 74this.Attributes,
Workspace\Solution\DocumentState.cs (15)
97=> ParseOptions?.Kind ?? Attributes.SourceCodeKind; 100=> Attributes.IsGenerated; 323Attributes.SyntaxTreeFilePath, 330Attributes, 359newTree = treeFactory.CreateSyntaxTree(Attributes.SyntaxTreeFilePath, options, text: null, existingTree.Encoding, LoadTextOptions.ChecksumAlgorithm, existingRoot); 370Attributes.SyntaxTreeFilePath, 377Attributes.With(sourceCodeKind: options.Kind), 396return WithAttributes(Attributes.With(sourceCodeKind: kind)); 401Contract.ThrowIfTrue(ReferenceEquals(newAttributes, Attributes)); 404if (newAttributes.SyntaxTreeFilePath != Attributes.SyntaxTreeFilePath) 435Attributes, 470Attributes.SyntaxTreeFilePath, 479Attributes, 516var (text, treeAndVersion) = CreateTreeWithLazyText(newRoot, newTextVersion, newTreeVersion, encoding, LoadTextOptions.ChecksumAlgorithm, Attributes, ParseOptions, syntaxTreeFactory); 521Attributes,
Workspace\Solution\DocumentState_LinkedFileReuse.cs (2)
71Attributes, 96this.Attributes, this.LanguageServices, this.DocumentServiceProvider, this.LoadTextOptions, this.ParseOptions,
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
261if (documentState.Value.Attributes.DesignTimeOnly)
Workspace\Solution\SolutionState.cs (1)
965var newDocument = oldDocument.WithAttributes(updateAttributes(oldDocument.Attributes, arg));
Workspace\Solution\SourceGeneratedDocumentState.cs (3)
217this.Attributes, 239var newTree = factory.CreateSyntaxTree(Attributes.SyntaxTreeFilePath, ParseOptions, sourceText, sourceText.Encoding, sourceText.ChecksumAlgorithm, newRoot); 251this.Attributes,
Workspace\Solution\StateChecksums.cs (1)
524onAssetFound(Info, state.Attributes, arg);
Workspace\Solution\TextDocumentState.cs (7)
48public DocumentId Id => Attributes.Id; 49public string? FilePath => Attributes.FilePath; 50public IReadOnlyList<string> Folders => Attributes.Folders; 51public string Name => Attributes.Name; 59=> ReferenceEquals(newAttributes, Attributes) ? this : UpdateAttributes(newAttributes); 234=> oldState.Attributes != Attributes;
Workspace\Solution\TextDocumentState_Checksum.cs (1)
39var infoChecksum = this.Attributes.Checksum;
Workspace\Workspace.cs (4)
1140var oldAttributes = oldSolution.GetDocument(documentId)!.State.Attributes; 1678new DocumentInfo(newDoc.DocumentState.Attributes, loader: null, documentServiceProvider: newDoc.State.DocumentServiceProvider)); 2082isGenerated: doc.State.Attributes.IsGenerated) 2083.WithDesignTimeOnly(doc.State.Attributes.DesignTimeOnly)
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
SolutionTests\SolutionTests.cs (4)
2404Assert.False(document.State.Attributes.IsGenerated); 2432Assert.True(document.State.Attributes.IsGenerated); 2484Assert.False(document2.State.Attributes.IsGenerated); 2523Assert.False(document2.State.Attributes.IsGenerated);
Microsoft.VisualStudio.LanguageServices (2)
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
1342if (document.State.Attributes.IsGenerated != updatedInfo.IsGenerated) 1345$"This Workspace does not support changing a document's {nameof(document.State.Attributes.IsGenerated)} state.");