134 references to State
IdeCoreBenchmarks (2)
CloudCachePersistentStorage.cs (2)
75? s_projectToContainerKeyCache.GetValue(project.State, _projectToContainerKeyCacheCallback).ProjectContainerKey 87? s_projectToContainerKeyCache.GetValue(document.Project.State, _projectToContainerKeyCacheCallback).GetDocumentContainerKey(document.State)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
54var documentId = solution.Projects.Single().State.AnalyzerConfigDocumentStates.Ids.First();
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
1022Assert.Equal(1, project.State.AnalyzerConfigDocumentStates.Count);
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
63var configFileDirectoryOptions = project.State.GetAnalyzerOptionsForPath(givenFolder.FullName, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
SolutionCrawler\WorkCoordinatorTests.cs (2)
462Assert.True(project.State.RunAnalyzers); 468Assert.False(project.State.RunAnalyzers);
Microsoft.CodeAnalysis.Features (48)
EditAndContinue\EditAndContinueWorkspaceService.cs (2)
134? solution.Projects.Select(project => (project, project.State.DocumentStates.States.Values)) 167select (project, from documentId in projectDocumentIds select project.State.DocumentStates.GetState(documentId));
EditAndContinue\EditSession.cs (38)
337if (oldProject.State == newProject.State) 342foreach (var documentId in newProject.State.DocumentStates.GetChangedStateIds(oldProject.State.DocumentStates, ignoreUnchangedContent: true)) 363foreach (var documentId in newProject.State.DocumentStates.GetAddedStateIds(oldProject.State.DocumentStates)) 387foreach (var documentId in newProject.State.AdditionalDocumentStates.GetChangedStateIds(oldProject.State.AdditionalDocumentStates, ignoreUnchangedContent: true)) 396foreach (var documentId in newProject.State.AnalyzerConfigDocumentStates.GetChangedStateIds(oldProject.State.AnalyzerConfigDocumentStates, ignoreUnchangedContent: true)) 406if (newProject.State.DocumentStates.GetRemovedStateIds(oldProject.State.DocumentStates).Any() || 407newProject.State.AdditionalDocumentStates.GetRemovedStateIds(oldProject.State.AdditionalDocumentStates).Any() || 408newProject.State.AdditionalDocumentStates.GetAddedStateIds(oldProject.State.AdditionalDocumentStates).Any() || 409newProject.State.AnalyzerConfigDocumentStates.GetRemovedStateIds(oldProject.State.AnalyzerConfigDocumentStates).Any() || 410newProject.State.AnalyzerConfigDocumentStates.GetAddedStateIds(oldProject.State.AnalyzerConfigDocumentStates).Any()) 429var oldSourceGeneratedDocumentStates = await oldProject.Solution.State.GetSourceGeneratedDocumentStatesAsync(oldProject.State, cancellationToken).ConfigureAwait(false); 433var newSourceGeneratedDocumentStates = await newProject.Solution.State.GetSourceGeneratedDocumentStatesAsync(newProject.State, cancellationToken).ConfigureAwait(false); 465if (!newProject.SupportsEditAndContinue() || oldProject.State == newProject.State) 470foreach (var documentId in newProject.State.DocumentStates.GetChangedStateIds(oldProject.State.DocumentStates, ignoreUnchangedContent: true)) 483if (!newProject.State.DocumentStates.HasAnyStateChanges(oldProject.State.DocumentStates) && 484!newProject.State.AdditionalDocumentStates.HasAnyStateChanges(oldProject.State.AdditionalDocumentStates) && 485!newProject.State.AnalyzerConfigDocumentStates.HasAnyStateChanges(oldProject.State.AnalyzerConfigDocumentStates)) 493var oldSourceGeneratedDocumentStates = await oldProject.Solution.State.GetSourceGeneratedDocumentStatesAsync(oldProject.State, cancellationToken).ConfigureAwait(false); 497var newSourceGeneratedDocumentStates = await newProject.Solution.State.GetSourceGeneratedDocumentStatesAsync(newProject.State, cancellationToken).ConfigureAwait(false); 852Telemetry.LogProjectAnalysisSummary(ProjectAnalysisSummary.ValidChanges, newProject.State.ProjectInfo.Attributes.TelemetryId, ImmutableArray.Create(mvidReadError.Descriptor.Id)); 937Telemetry.LogProjectAnalysisSummary(projectSummary, newProject.State.ProjectInfo.Attributes.TelemetryId, moduleDiagnostics.NullToEmpty().SelectAsArray(d => d.Descriptor.Id)); 950Telemetry.LogProjectAnalysisSummary(projectSummary, newProject.State.ProjectInfo.Attributes.TelemetryId, createBaselineDiagnostics); 1079Telemetry.LogProjectAnalysisSummary(projectSummary, newProject.State.ProjectInfo.Attributes.TelemetryId, emitResult.Diagnostics);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
587oldProject.State.RunAnalyzers != newProject.State.RunAnalyzers)
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
209var projectState = document.Project.State; 555? definition.SourceSpans[0].Document.Project.State
NavigateTo\RoslynNavigateToItem.cs (2)
153var (firstProjectName, firstProjectFlavor) = firstProject.State.NameAndFlavor; 168var (projectName, projectFlavor) = additionalProject.State.NameAndFlavor;
SolutionCrawler\WorkCoordinator.cs (2)
524oldProject.State.RunAnalyzers != newProject.State.RunAnalyzers)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
214if (!project.State.RunAnalyzers || globalOptions.GetBackgroundAnalysisScope(project.Language) == BackgroundAnalysisScope.None)
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (1)
196var parseOptionsChecksum = project.State.GetParseOptionsChecksum();
Microsoft.CodeAnalysis.Remote.ServiceHub (21)
CloudCachePersistentStorage.cs (2)
75? s_projectToContainerKeyCache.GetValue(project.State, _projectToContainerKeyCacheCallback).ProjectContainerKey 87? s_projectToContainerKeyCache.GetValue(document.Project.State, _projectToContainerKeyCacheCallback).GetDocumentContainerKey(document.State)
Host\RemoteWorkspace.SolutionCreator.cs (17)
217project.State.ProjectInfo.Attributes.FixUpCompilationOptions( 255project.State.DocumentStates.States.Values, 269project.State.AdditionalDocumentStates.States.Values, 283project.State.AnalyzerConfigDocumentStates.States.Values, 299Contract.ThrowIfFalse(project.State.ProjectInfo.Attributes.Id == newProjectAttributes.Id); 300Contract.ThrowIfFalse(project.State.ProjectInfo.Attributes.Language == newProjectAttributes.Language); 301Contract.ThrowIfFalse(project.State.ProjectInfo.Attributes.IsSubmission == newProjectAttributes.IsSubmission); 305if (project.State.ProjectInfo.Attributes.Name != newProjectAttributes.Name) 310if (project.State.ProjectInfo.Attributes.AssemblyName != newProjectAttributes.AssemblyName) 315if (project.State.ProjectInfo.Attributes.FilePath != newProjectAttributes.FilePath) 320if (project.State.ProjectInfo.Attributes.OutputFilePath != newProjectAttributes.OutputFilePath) 325if (project.State.ProjectInfo.Attributes.OutputRefFilePath != newProjectAttributes.OutputRefFilePath) 330if (project.State.ProjectInfo.Attributes.CompilationOutputInfo != newProjectAttributes.CompilationOutputInfo) 335if (project.State.ProjectInfo.Attributes.DefaultNamespace != newProjectAttributes.DefaultNamespace) 340if (project.State.ProjectInfo.Attributes.HasAllInformation != newProjectAttributes.HasAllInformation) 345if (project.State.ProjectInfo.Attributes.RunAnalyzers != newProjectAttributes.RunAnalyzers) 350if (project.State.ProjectInfo.Attributes.ChecksumAlgorithm != newProjectAttributes.ChecksumAlgorithm)
Host\TestUtils.cs (2)
197var projectChecksums = await project.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 198await projectChecksums.FindAsync(project.State, Flatten(projectChecksums), map, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (28)
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
75project.State, static p => new AsyncLazy<Checksum>(c => ComputeSourceSymbolsChecksumAsync(p, c), cacheResult: true));
Workspace\Host\PersistentStorage\ProjectKey.cs (1)
44=> ToProjectKey(project.Solution.State, project.State);
Workspace\Solution\Document.cs (1)
503var provider = (ProjectState.ProjectAnalyzerConfigOptionsProvider)Project.State.AnalyzerOptions.AnalyzerConfigOptionsProvider;
Workspace\Solution\Project.cs (3)
286var generatedDocumentStates = await _solution.State.GetSourceGeneratedDocumentStatesAsync(this.State, cancellationToken).ConfigureAwait(false); 307var generatedDocumentStates = await _solution.State.GetSourceGeneratedDocumentStatesAsync(State, cancellationToken).ConfigureAwait(false); 350return _solution.State.GetSourceGeneratorDiagnosticsAsync(this.State, cancellationToken);
Workspace\Solution\ProjectChanges.cs (18)
103=> _newProject.State.DocumentStates.GetAddedStateIds(_oldProject.State.DocumentStates); 109=> _newProject.State.AdditionalDocumentStates.GetAddedStateIds(_oldProject.State.AdditionalDocumentStates); 115=> _newProject.State.AnalyzerConfigDocumentStates.GetAddedStateIds(_oldProject.State.AnalyzerConfigDocumentStates); 133=> _newProject.State.DocumentStates.GetChangedStateIds(_oldProject.State.DocumentStates, onlyGetDocumentsWithTextChanges, ignoreUnchangeableDocuments); 140=> _newProject.State.AdditionalDocumentStates.GetChangedStateIds(_oldProject.State.AdditionalDocumentStates); 147=> _newProject.State.AnalyzerConfigDocumentStates.GetChangedStateIds(_oldProject.State.AnalyzerConfigDocumentStates); 153=> _newProject.State.DocumentStates.GetRemovedStateIds(_oldProject.State.DocumentStates); 159=> _newProject.State.AdditionalDocumentStates.GetRemovedStateIds(_oldProject.State.AdditionalDocumentStates); 165=> _newProject.State.AnalyzerConfigDocumentStates.GetRemovedStateIds(_oldProject.State.AnalyzerConfigDocumentStates);
Workspace\Workspace.cs (4)
1467var document = projectChanges.OldProject.State.DocumentStates.GetState(documentId) ?? 1468projectChanges.NewProject.State.DocumentStates.GetState(documentId)!; 1758project.State.Attributes.With(version: VersionStamp.Create()), 1767hostObjectType: project.State.HostObjectType);
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\ProjectMap.cs (1)
79AddProjectInfo(project.State.ProjectInfo);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
266Assert.Equal(SourceHashAlgorithm.Sha1, project.State.ChecksumAlgorithm); 284Assert.Equal(SourceHashAlgorithms.Default, project.State.ChecksumAlgorithm);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (3)
1086s => s.GetRequiredProject(projectId).State.ChecksumAlgorithm, 3285var compilation = await solution.State.GetCompilationAsync(doc.Project.State, CancellationToken.None).ConfigureAwait(false); 4399var documentOptionsViaSyntaxTree = document.Project.State.AnalyzerOptions.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
Microsoft.VisualStudio.LanguageServices (8)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (4)
315p => p != project && p.FilePath == project.FilePath && p.State.NameAndFlavor.name == project.State.NameAndFlavor.name).ToImmutableArray(); 317projectOrSolutionName = project.State.NameAndFlavor.name; 384: projects.Where(p => !p.State.RunAnalyzers).ToImmutableArrayOrEmpty();
FindReferences\StreamingFindUsagesPresenter.cs (1)
288var (projectName, projectFlavor) = document.Project.State.NameAndFlavor;
ProjectSystem\VisualStudioWorkspaceImpl.RemoveAnalyzerConfigDocumentUndoUnit.cs (1)
22=> fromProject.State.AnalyzerConfigDocumentStates.Ids;
Storage\CloudCachePersistentStorage.cs (2)
75? s_projectToContainerKeyCache.GetValue(project.State, _projectToContainerKeyCacheCallback).ProjectContainerKey 87? s_projectToContainerKeyCache.GetValue(document.Project.State, _projectToContainerKeyCacheCallback).GetDocumentContainerKey(document.State)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (2)
136Assert.Equal(expectedRunAnalyzers, environment.Workspace.CurrentSolution.Projects.Single().State.RunAnalyzers); 156Assert.Equal(expectedRunAnalyzers, environment.Workspace.CurrentSolution.Projects.Single().State.RunAnalyzers);
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (2)
177Assert.Equal(SourceHashAlgorithms.Default, environment.Workspace.CurrentSolution.Projects.Single().State.ChecksumAlgorithm); 182Assert.Equal(SourceHashAlgorithm.Sha1, environment.Workspace.CurrentSolution.Projects.Single().State.ChecksumAlgorithm);
Roslyn.VisualStudio.Next.UnitTests (10)
Remote\SnapshotSerializationTests.cs (3)
196var firstProjectChecksum = await solution.GetProject(solution.ProjectIds[0]).State.GetChecksumAsync(CancellationToken.None); 197var secondProjectChecksum = await solution.GetProject(solution.ProjectIds[1]).State.GetChecksumAsync(CancellationToken.None); 550var checksum = await project.State.GetChecksumAsync(CancellationToken.None).ConfigureAwait(false);
Services\AssetProviderTests.cs (2)
128await project.State.GetChecksumAsync(CancellationToken.None); 139await service.SynchronizeProjectAssetsAsync(new HashSet<Checksum> { await project.State.GetChecksumAsync(CancellationToken.None) }, CancellationToken.None);
Services\ServiceHubServicesTests.cs (2)
404Assert.Equal(projectStateShouldSame, object.ReferenceEquals(solution1.GetProject(currentProjectId).State, solution2.GetProject(currentProjectId).State));
Services\SolutionServiceTests.cs (3)
190Assert.Equal(SourceHashAlgorithm.Sha1 + version, project.State.ChecksumAlgorithm); 191Assert.Equal((version % 2) != 0, project.State.HasAllInformation); 192Assert.Equal((version % 2) != 0, project.State.RunAnalyzers);