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