15 types derived from Workspace
Microsoft.CodeAnalysis.EditorFeatures (2)
Interactive\InteractiveWorkspace.cs (1)
12internal partial class InteractiveWorkspace : Workspace
Shared\Preview\PreviewWorkspace.cs (1)
14internal class PreviewWorkspace : Workspace
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\MefTestWorkspace.cs (1)
14internal class MefTestWorkspace : Workspace
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerWorkspace.cs (1)
39internal class LanguageServerWorkspace : Workspace, ILspWorkspace
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Host\RemoteWorkspace.cs (1)
23internal sealed partial class RemoteWorkspace : Workspace
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
27public sealed class MSBuildWorkspace : Workspace
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (1)
37public abstract partial class TestWorkspace<TDocument, TProject, TSolution> : Workspace, ILspWorkspace
WorkspaceTestUtilities.cs (1)
17private class WorkspaceWithPartialSemantics : Workspace
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\TryApplyChangesTests.cs (1)
18private class CustomizedCanApplyWorkspace : Workspace
WorkspaceTests\AdhocWorkspaceTests.cs (1)
393public class WorkspaceWithPartialSemantics : Workspace
WorkspaceTests\WorkspaceTests.cs (1)
112private class NoChangesAllowedWorkspace : Workspace
Microsoft.VisualStudio.LanguageServices (3)
DebuggerIntelliSense\DebuggerIntellisenseWorkspace.cs (1)
12internal sealed class DebuggerIntelliSenseWorkspace : Workspace
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
32internal sealed partial class MiscellaneousFilesWorkspace : Workspace, IOpenTextBufferEventListener
ProjectSystem\VisualStudioWorkspace.cs (1)
22public abstract class VisualStudioWorkspace : Workspace
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
39internal sealed class RemoteLanguageServiceWorkspace : CodeAnalysis.Workspace, IDisposable, IOpenTextBufferEventListener
1371 references to Workspace
AnalyzerRunner (6)
CodeRefactoringRunner.cs (2)
27private readonly Workspace _workspace; 32public CodeRefactoringRunner(Workspace workspace, Options options)
DiagnosticAnalyzerRunner.cs (2)
25private readonly Workspace _workspace; 29public DiagnosticAnalyzerRunner(Workspace workspace, Options options)
IncrementalAnalyzerRunner.cs (2)
21private readonly Workspace _workspace; 24public IncrementalAnalyzerRunner(Workspace workspace, Options options)
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
41private readonly Workspace _workspace;
IdeCoreBenchmarks (1)
ProjectOperationBenchmarks.cs (1)
22private Workspace _workspace;
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticProject.cs (2)
31public static Project Create(Assembly testAssembly, string[] sources, Func<Workspace> workspaceFactory = null, Type[] analyzerReferences = null) 86private static Workspace CreateWorkspace()
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
152Func<Workspace> createWorkspace = CreateWorkspace;
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
LanguageServices\SemanticModelWorkspaceService\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (1)
16public SemanticModelReuseWorkspaceService(Workspace _)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
98var workspace = document.Project.Solution.Workspace;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
23private readonly Workspace _workspace; 40public MefWorkspaceServices(IMefHostExportProvider host, Workspace workspace) 62public override Workspace Workspace
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Lightup\NullableSyntaxAnnotationEx.cs (1)
21var nullableSyntaxAnnotation = typeof(Workspace).Assembly.GetType("Microsoft.CodeAnalysis.CodeGeneration.NullableSyntaxAnnotation", throwOnError: false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (67)
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersFixAllTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddExplicitCast\AddExplicitCastTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredExpressionParenthesesTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredPatternParenthesesTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.cs (1)
29internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateEnumMember\GenerateEnumMemberTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateConversionTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateDeconstructMethodTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\HideBase\HideBaseTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Iterator\ChangeToIEnumerableTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
42internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeRefStruct\MakeRefStructTests.cs (1)
45internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeTypeAbstract\MakeTypeAbstractTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersCompilerErrorTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchExpressionTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchStatementTests.cs (1)
20internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveInKeyword\RemoveInKeywordCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveNewModifier\RemoveNewModifierCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_FixAllTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests_FixAllTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedLocalFunction\RemoveUnusedLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
32internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExplicitTypeForConst\UseExplicitTypeForConstTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExpressionBodyForLambda\UseExpressionBodyForLambdasAnalyzerTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseSystemHashCode\UseSystemHashCodeTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ValidateFormatString\ValidateFormatStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
173var workspace = document.Project.Solution.Workspace;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (38)
CodeActions\AddUsing\AbstractAddUsingTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\AddUsing\AddUsingNuGetTests.cs (8)
41Workspace workspace, TestParameters parameters) 60installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 97installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 132installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 167installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 278installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", /*versionOpt*/ null, It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 316installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", "1.0", It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>())) 353installerServiceMock.Setup(s => s.TryInstallPackageAsync(It.IsAny<Workspace>(), It.IsAny<DocumentId>(), It.IsAny<string>(), "NuGetPackage", "1.0", It.IsAny<bool>(), It.IsAny<IProgress<CodeAnalysisProgress>>(), It.IsAny<CancellationToken>()))
CodeActions\AddUsing\AddUsingTestsWithAddImportDiagnosticProvider.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (2)
40protected override Task<Workspace> CreateWorkspaceImplAsync() 49return Task.FromResult<Workspace>(workspace);
CodeActions\GenerateType\GenerateTypeTests.cs (1)
29internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\GenerateType\GenerateTypeWithUnboundAnalyzerTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (2)
3465protected override Task<Workspace> CreateWorkspaceImplAsync() 3477return Task.FromResult<Workspace>(workspace);
Completion\CompletionServiceTests.cs (1)
204using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics();
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
49internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (9)
33private static Workspace CreateWorkspaceWithProjectAndDocuments() 48private static IGlobalOptionService GetGlobalOptions(Workspace workspace) 51private static AnalyzerConfigDocument CreateAnalyzerConfigDocument(Workspace workspace, string contents) 65using var workspace = CreateWorkspaceWithProjectAndDocuments(); 74using var workspace = CreateWorkspaceWithProjectAndDocuments(); 329var workspace = CreateWorkspaceWithProjectAndDocuments(); 343var workspace = CreateWorkspaceWithProjectAndDocuments(); 379var workspace = CreateWorkspaceWithProjectAndDocuments(); 399var workspace = CreateWorkspaceWithProjectAndDocuments();
EventHookup\EventHookupTestState.cs (6)
35Workspace.GetService<IThreadingContext>(), 36Workspace.GetService<IInlineRenameService>(), 37Workspace.GetService<EventHookupSessionManager>(), 38Workspace.GetService<IGlobalOptionService>(), 39Workspace.GetService<IAsynchronousOperationListenerProvider>()); 46Workspace.SetAnalyzerFallbackOptions(options);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
156var masWorkspace = service.TryGetWorkspace();
PdbSourceDocument\NullResultMetadataAsSourceFileProvider.cs (1)
41public Task<MetadataAsSourceFile?> GetGeneratedFileAsync(MetadataAsSourceWorkspace metadataWorkspace, Workspace sourceWorkspace, Project sourceProject, ISymbol symbol, bool signaturesOnly, MetadataAsSourceOptions options, string tempPath, TelemetryMessage? telemetry, CancellationToken cancellationToken)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
874$"The source generated document given to the '{nameof(Workspace.DocumentOpened)}' event handler did not have the same id as the one created for the test.")); 878$"The source generated document given to the '{nameof(Workspace.DocumentClosed)}' event handler did not have the same id as the one created for the test."));
Microsoft.CodeAnalysis.CSharp.Features (1)
Copilot\CSharpCopilotCodeFixProvider.DismissChangesCodeAction.cs (1)
34public override void Apply(Workspace workspace, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (110)
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureCodeStyle\EnumCodeStyleOptionConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureCodeStyle\MultipleCodeStyleOptionConfigurationTests.cs (1)
37internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\CSharpCodeStyleOptionBasedSeverityConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
47internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedSeverityConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Configuration\ConfigureSeverity\VarForBuiltInTypesSeverityConfigurationTests.cs (1)
26internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Suppression\RemoveSuppressionTests.cs (2)
56internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 945internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Suppression\SuppressionAllCodeTests.cs (1)
30internal override Tuple<Analyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
30internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
Diagnostics\Suppression\SuppressionTests.cs (13)
49internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 664internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 713internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 750internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 823internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 886internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 936internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 971internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 992internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1029internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 1116internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 2086internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace) 2464internal override Tuple<DiagnosticAnalyzer, IConfigurationFixProvider> CreateDiagnosticProviderAndFixer(Workspace workspace)
EmbeddedLanguages\ValidateJsonStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
EmbeddedLanguages\ValidateRegexStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
ExtractClass\ExtractClassTests.cs (2)
49protected override Task<Workspace> CreateWorkspaceImplAsync() 53return Task.FromResult<Workspace>(TestWorkspace.Create(WorkspaceKind, LanguageNames.CSharp, unusedCompilationOptions, unusedParseOptions));
FullyQualify\FullyQualifyTests.cs (1)
29internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
FullyQualify\FullyQualifyUnboundIdentifierTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
GenerateVariable\GenerateVariableTests.cs (1)
34internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProviderTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
PreferFrameworkType\PreferFrameworkTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_AsTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
RemoveUnusedVariable\RemoveUnusedVariableTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SimplifyThisOrMe\SimplifyThisOrMeTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
SpellCheck\SpellCheckTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAccessibilityModifiers\AddAccessibilityModifiersFixAllTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddBraces\AddBracesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddExplicitCast\AddExplicitCastTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddParameter\AddParameterTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredExpressionParenthesesTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AddRequiredParentheses\AddRequiredPatternParenthesesTests.cs (1)
28internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.cs (1)
29internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\AddDocCommentNodesCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateEnumMember\GenerateEnumMemberTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateConversionTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateDeconstructMethodTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\GenerateMethod\GenerateMethodTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\HideBase\HideBaseTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ImplementAbstractClass\ImplementAbstractClassTests_ThroughMember.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InlineDeclaration\CSharpInlineDeclarationTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessTests.cs (1)
21internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Iterator\ChangeToIEnumerableTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.cs (1)
42internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeLocalFunctionStatic\MakeLocalFunctionStaticTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.cs (1)
22internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeRefStruct\MakeRefStructTests.cs (1)
45internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MakeTypeAbstract\MakeTypeAbstractTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\Nullable\CSharpDeclareAsNullableCodeFixTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersCompilerErrorTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\OrderModifiers\OrderModifiersTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchExpressionTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\PopulateSwitch\PopulateSwitchStatementTests.cs (1)
20internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveInKeyword\RemoveInKeywordCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveNewModifier\RemoveNewModifierCodeFixProviderTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests_FixAllTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests_FixAllTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedLocalFunction\RemoveUnusedLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
32internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ReplaceDefaultLiteral\ReplaceDefaultLiteralTests.cs (1)
21internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpdateProjectToAllowUnsafe\UpdateProjectToAllowUnsafeTests.cs (1)
27internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (1)
28internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (1)
27internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExplicitTypeForConst\UseExplicitTypeForConstTests.cs (1)
24internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseExpressionBodyForLambda\UseExpressionBodyForLambdasAnalyzerTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
24internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
25internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInferredMemberName\UseInferredMemberNameTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseInterpolatedVerbatimString\UseInterpolatedVerbatimStringCodeFixTests.cs (1)
25internal override (DiagnosticAnalyzer?, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForCastAndEqualityOperatorTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseLocalFunction\UseLocalFunctionTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpAsAndNullCheckTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
30internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseSystemHashCode\UseSystemHashCodeTests.cs (1)
23internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\UseThrowExpression\UseThrowExpressionTests.cs (1)
29internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
src\Analyzers\CSharp\Tests\ValidateFormatString\ValidateFormatStringTests.cs (1)
26internal override (DiagnosticAnalyzer, CodeFixProvider?) CreateDiagnosticProviderAndFixer(Workspace workspace)
UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzerTests.cs (1)
33internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzerTests.cs (1)
22internal override (DiagnosticAnalyzer, CodeFixProvider) CreateDiagnosticProviderAndFixer(Workspace workspace)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Lightup\NullableSyntaxAnnotationEx.cs (1)
21var nullableSyntaxAnnotation = typeof(Workspace).Assembly.GetType("Microsoft.CodeAnalysis.CodeGeneration.NullableSyntaxAnnotation", throwOnError: false);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (2)
32private Workspace _workspace; 35private Workspace Workspace
Formatting\CSharpFormattingTestBase.cs (2)
15private Workspace? _ws; 17protected Workspace DefaultWorkspace
Microsoft.CodeAnalysis.EditorFeatures (151)
AddImports\AbstractAddImportsPasteCommandHandler.cs (2)
112if (!Workspace.TryGetWorkspace(sourceTextContainer, out var workspace))
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (2)
44private static bool IsAvailable(ITextBuffer subjectBuffer, [NotNullWhen(true)] out Workspace? workspace) 97private static void HandleResult(ChangeSignatureResult result, Solution oldSolution, Workspace workspace, CommandExecutionContext context)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (7)
39Workspace Workspace, 64private Workspace? _workspace; 67/// Cached values for the last services we computed for a particular <see cref="Workspace"/> and <see 110_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer()); 138var workspace = _workspace; 178var newWorkspace = _workspaceRegistration.Workspace; 222private void ConnectToWorkspace(Workspace workspace)
CodeActions\CodeActionEditHandlerService.cs (5)
43Workspace workspace, ImmutableArray<CodeActionOperation> operations, CancellationToken cancellationToken) 93Workspace workspace, 261Workspace workspace, 290Workspace workspace, 353var editorWorkspace = workspace;
CodeActions\ICodeActionEditHandlerService.cs (2)
18Workspace workspace, ImmutableArray<CodeActionOperation> operations, CancellationToken cancellationToken); 21Workspace workspace,
CodeDefinitionWindow\DefinitionContextTracker.cs (1)
145var workspace = document.Project.Solution.Workspace;
EditAndContinue\ActiveStatementTaggerProvider.EventSource.cs (2)
14protected override void ConnectToWorkspace(Workspace workspace) 24protected override void DisconnectFromWorkspace(Workspace workspace)
EditAndContinue\ActiveStatementTrackingService.cs (4)
37internal sealed class ActiveStatementTrackingService(Workspace workspace, IAsynchronousOperationListener listener) : IActiveStatementTrackingService 62private readonly Workspace _workspace = workspace; 102private readonly Workspace _workspace; 118public TrackingSession(Workspace workspace, IActiveStatementSpanFactory spanProvider)
EditAndContinue\PdbMatchingSourceTextProvider.cs (2)
38public void StartListening(Workspace workspace, object serviceOpt) 43public void StopListening(Workspace workspace)
Editor\ITextUndoHistoryWorkspaceService.cs (1)
15bool TryGetTextUndoHistory(Workspace editorWorkspace, ITextBuffer textBuffer, out ITextUndoHistory undoHistory);
Editor\TextEditApplication.cs (2)
34if (Workspace.TryGetWorkspace(oldText.Container, out var workspace))
EditorConfigSettings\Aggregator\SettingsAggregator.cs (2)
20private readonly Workspace _workspace; 29Workspace workspace,
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (1)
22public AnalyzerSettingsProvider(string fileName, AnalyzerSettingsUpdater settingsUpdater, Workspace workspace, IDiagnosticAnalyzerService analyzerService)
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProviderFactory.cs (2)
11internal class AnalyzerSettingsProviderFactory(Workspace workspace, IDiagnosticAnalyzerService analyzerService) : IWorkspaceSettingsProviderFactory<AnalyzerSetting> 13private readonly Workspace _workspace = workspace;
EditorConfigSettings\DataProvider\NamingStyles\NamingStyleSettingsProvider.cs (1)
20public NamingStyleSettingsProvider(string fileName, NamingStyleSettingsUpdater settingsUpdater, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\NamingStyles\NamingStyleSettingsProviderFactory.cs (2)
11internal sealed class NamingStyleSettingsProviderFactory(Workspace workspace, IGlobalOptionService globalOptions) : IWorkspaceSettingsProviderFactory<NamingStyleSetting> 13private readonly Workspace _workspace = workspace;
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (2)
33protected readonly Workspace Workspace; 38protected SettingsProviderBase(string fileName, TOptionsUpdater settingsUpdater, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\Updater\AnalyzerSettingsUpdater.cs (1)
12internal class AnalyzerSettingsUpdater(Workspace workspace, string editorconfigPath) : SettingsUpdaterBase<AnalyzerSetting, ReportDiagnostic>(workspace, editorconfigPath)
EditorConfigSettings\Updater\NamingStyles\NamingStyleSettingsUpdater.cs (1)
20internal partial class NamingStyleSettingsUpdater(Workspace workspace, IGlobalOptionService globalOptions, string editorconfigPath) : SettingsUpdaterBase<(Action<(object, object?)> onSettingChange, NamingStyleSetting option), object>(workspace, editorconfigPath)
EditorConfigSettings\Updater\OptionUpdater.cs (1)
12internal class OptionUpdater(Workspace workspace, string editorconfigPath) : SettingsUpdaterBase<IOption2, object>(workspace, editorconfigPath)
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (2)
21protected readonly Workspace Workspace; 26protected SettingsUpdaterBase(Workspace workspace, string editorconfigPath)
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
67var workspace = initialDocument.Project.Solution.Workspace; 108var workspace = solution.Workspace;
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (2)
48var workspace = document.Project.Solution.Workspace; 56protected async Task NavigateToPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken)
Extensibility\NavigationBar\NavigationBarProjectItem.cs (2)
14Workspace workspace, 21public Workspace Workspace { get; } = workspace;
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFindUsagesContext.cs (5)
46public abstract Task<bool> CanNavigateToAsync(Workspace workspace, CancellationToken cancellationToken); 47public abstract Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken); 68public override async Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken) 111public async Task<bool> CanNavigateToAsync(Workspace workspace, CancellationToken cancellationToken) 114public async Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\VSTypeScriptExtensions.cs (1)
16public static void ApplyTextChanges(this Workspace workspace, DocumentId id, IEnumerable<TextChange> textChanges, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\VSTypeScriptGlobalOptions.cs (1)
38public void SetBackgroundAnalysisScope(Workspace workspace, bool openFilesOnly)
ExternalAccess\VSTypeScript\Api\VSTypeScriptInlineRenameInfo.cs (2)
53bool IInlineRenameInfo.TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) 56bool IInlineRenameInfo.TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText)
ExternalAccess\VSTypeScript\VSTypeScriptNavigationBarItemService.cs (1)
59var workspace = document.Project.Solution.Workspace;
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
38if (!IsAvailable(subjectBuffer, out var workspace)) 94private static bool IsAvailable(ITextBuffer subjectBuffer, out Workspace workspace)
ExtractMethod\ExtractMethodCommandHandler.cs (1)
71if (!args.SubjectBuffer.TryGetWorkspace(out var workspace) ||
Formatting\FormatCommandHandler.Paste.cs (1)
52if (!subjectBuffer.TryGetWorkspace(out var workspace) ||
Host\IStreamingFindReferencesPresenter.cs (2)
69Workspace workspace, 87Workspace workspace,
InlineRename\AbstractEditorInlineRenameService.FailureInlineRenameInfo.cs (2)
48public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) => false; 50public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) => false;
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (2)
142public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) 148public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText)
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (3)
56if (!args.SubjectBuffer.TryGetWorkspace(out var workspace)) 131return args.SubjectBuffer.TryGetWorkspace(out var workspace) && 139private async Task ShowErrorDialogAsync(Workspace workspace, string message)
InlineRename\IEditorInlineRenameService.cs (2)
235bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText); 241bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText);
InlineRename\IInlineRenameUndoManager.cs (1)
22void CreateStartRenameUndoTransaction(Workspace workspace, ITextBuffer subjectBuffer, IInlineRenameSession inlineRenameSession);
InlineRename\InlineRenameService.cs (1)
128var workspace = document.Project.Solution.Workspace;
InlineRename\InlineRenameSession.cs (5)
137Workspace workspace, 164Workspace.WorkspaceChanged += OnWorkspaceChanged; 213foreach (var d in Workspace.GetOpenDocumentIds()) 258RenameTrackingDismisser.DismissRenameTracking(Workspace, Workspace.GetOpenDocumentIds()); 266if (Workspace.Kind == WorkspaceKind.Interactive)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
58Workspace workspace,
InlineRename\UndoManagerServiceFactory.cs (1)
41public void CreateStartRenameUndoTransaction(Workspace workspace, ITextBuffer subjectBuffer, IInlineRenameSession inlineRenameSession)
IntelliSense\NavigationActionFactory.cs (1)
47Workspace workspace,
IntelliSense\QuickInfo\QuickInfoHyperLink.cs (2)
13private readonly Workspace _workspace; 15public QuickInfoHyperLink(Workspace workspace, Uri uri)
IRefactorNotifyService.cs (2)
25bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure); 35bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure);
LanguageServer\AlwaysActiveLanguageClientEventListener.cs (1)
41public void StartListening(Workspace workspace, object serviceOpt)
Navigation\AbstractDefinitionLocationService.cs (1)
33var workspace = solution.Workspace;
Navigation\IDocumentNavigationServiceExtensions.cs (7)
31this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, TextSpan textSpan, NavigationOptions options, bool allowInvalidSpan, CancellationToken cancellationToken) 38this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, TextSpan textSpan, NavigationOptions options, CancellationToken cancellationToken) 45this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 52this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, NavigationOptions options, CancellationToken cancellationToken) 59this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) 65this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int position, NavigationOptions options, CancellationToken cancellationToken) 73this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int lineNumber, int offset, NavigationOptions options, CancellationToken cancellationToken)
NavigationBar\NavigationBarController_ModelComputation.cs (1)
105var workspace = textSnapshot.TextBuffer.GetWorkspace();
Organizing\OrganizeDocumentCommandHandler.cs (3)
72private static bool IsCommandSupported(EditorCommandArgs args, bool needsSemantics, [NotNullWhen(true)] out Workspace? workspace) 75if (args.SubjectBuffer.TryGetWorkspace(out var retrievedWorkspace)) 125if (!subjectBuffer.TryGetWorkspace(out var workspace))
Remote\SolutionChecksumUpdater.cs (2)
26private readonly Workspace _workspace; 57Workspace workspace,
RenameTracking\RenameTrackingTaggerProvider.cs (3)
62internal static void ResetRenameTrackingState(Workspace workspace, DocumentId documentId) 65internal static bool ResetVisibleRenameTrackingState(Workspace workspace, DocumentId documentId) 68internal static bool ResetRenameTrackingStateWorker(Workspace workspace, DocumentId documentId, bool visible)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
116Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (3)
129var workspace = document.Project.Solution.Workspace; 223private (NotificationSeverity, string)? TryUpdateWorkspaceForResetOfTypedIdentifier(Workspace workspace, Solution newSolution, int trackingSessionId) 255Workspace workspace,
SemanticSearch\SemanticSearchEditorWorkspace.cs (1)
42/// Used by code actions through <see cref="Workspace.TryApplyChanges(Solution)"/>.
Shared\Extensions\HostWorkspaceServicesExtensions.cs (2)
41=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out var workspace) ?
Shared\Extensions\IRefactorNotifyServiceExtensions.cs (2)
13Workspace workspace, 32Workspace workspace,
Shared\Extensions\ITextBufferExtensions.cs (4)
18if (buffer.TryGetWorkspace(out var workspace)) 27internal static bool TryGetWorkspace(this ITextBuffer buffer, [NotNullWhen(true)] out Workspace? workspace) 28=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out workspace); 57if (buffer.TryGetWorkspace(out var workspace))
Shared\Extensions\WorkspaceExtensions.cs (2)
22this Workspace workspace, IThreadingContext threadingContext, Document newDocument, CancellationToken cancellationToken) 39internal static void ApplyTextChanges(this Workspace workspace, DocumentId id, IEnumerable<TextChange> textChanges, CancellationToken cancellationToken)
Shared\Tagging\EventSources\AbstractWorkspaceTrackingTaggerEventSource.cs (4)
20protected Workspace? CurrentWorkspace { get; private set; } 25_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer()); 28protected abstract void ConnectToWorkspace(Workspace workspace); 29protected abstract void DisconnectFromWorkspace(Workspace workspace);
Shared\Tagging\EventSources\TaggerEventSources.DocumentActiveContextChangedEventSource.cs (2)
14protected override void ConnectToWorkspace(Workspace workspace) 17protected override void DisconnectFromWorkspace(Workspace workspace)
Shared\Tagging\EventSources\TaggerEventSources.ParseOptionChangedEventSource.cs (3)
16protected override void ConnectToWorkspace(Workspace workspace) 19protected override void DisconnectFromWorkspace(Workspace workspace) 32var workspace = e.NewSolution.Workspace;
Shared\Tagging\EventSources\TaggerEventSources.WorkspaceChangedEventSource.cs (2)
36protected override void ConnectToWorkspace(Workspace workspace) 42protected override void DisconnectFromWorkspace(Workspace workspace)
Shared\Tagging\EventSources\TaggerEventSources.WorkspaceRegistrationChangedEventSource.cs (2)
13protected override void ConnectToWorkspace(Workspace workspace) 16protected override void DisconnectFromWorkspace(Workspace workspace)
Shared\Utilities\RenameTrackingDismisser.cs (3)
12internal static void DismissRenameTracking(Workspace workspace, DocumentId documentId) 15internal static void DismissRenameTracking(Workspace workspace, IEnumerable<DocumentId> documentIds) 23internal static bool DismissVisibleRenameTracking(Workspace workspace, DocumentId documentId)
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (1)
50public void StartListening(Workspace workspace, object? serviceOpt)
SpellCheck\RoslynSpellCheckFixerProvider.cs (1)
109var workspace = document.Project.Solution.Workspace;
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
157_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
459if (Workspace.TryGetWorkspace(container, out _))
Undo\Extensions.cs (1)
17public static IWorkspaceGlobalUndoTransaction OpenGlobalUndoTransaction(this Workspace workspace, string description, bool useFallback = true)
Undo\IGlobalUndoService.cs (3)
19bool IsGlobalTransactionOpen(Workspace workspace); 24bool CanUndo(Workspace workspace); 29IWorkspaceGlobalUndoTransaction OpenGlobalUndoTransaction(Workspace workspace, string description);
Undo\NoOpGlobalUndoServiceFactory.cs (3)
35public bool IsGlobalTransactionOpen(Workspace workspace) 41public bool CanUndo(Workspace workspace) 47public IWorkspaceGlobalUndoTransaction OpenGlobalUndoTransaction(Workspace workspace, string description)
Workspaces\TextUndoHistoryWorkspaceServiceFactoryService.cs (1)
30public bool TryGetTextUndoHistory(Workspace editorWorkspace, ITextBuffer textBuffer, out ITextUndoHistory undoHistory)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (21)
Completion\AbstractArgumentProviderTests`1.cs (1)
75private IParameterSymbol GetParameterSymbolInfo(Workspace workspace, SemanticModel semanticModel, SyntaxNode root, int position, CancellationToken cancellationToken)
Completion\AbstractCompletionProviderTests.cs (6)
323var workspace = workspaceFixture.Target.GetWorkspace(markup, GetComposition()); 349var workspace = workspaceFixture.Target.GetWorkspace(markup, GetComposition()); 365var workspace = workspaceFixture.Target.GetWorkspace(markup, GetComposition(), workspaceKind: workspaceKind); 595var workspace = workspaceFixture.Target.GetWorkspace(); 682var workspace = workspaceFixture.Target.GetWorkspace(); 718var workspace = workspaceFixture.Target.GetWorkspace();
Diagnostics\GenerateType\TestProjectManagementService.cs (2)
26public IList<string> GetFolders(ProjectId projectId, Workspace workspace) 29public string GetDefaultNamespace(Project project, Workspace workspace)
Diagnostics\MockDiagnosticAnalyzerService.cs (2)
52public bool ContainsDiagnostics(Workspace workspace, ProjectId projectId) 58public Task<ImmutableArray<DiagnosticData>> GetCachedDiagnosticsAsync(Workspace workspace, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
DocumentTracking\FirstDocumentIsActiveAndVisibleDocumentTrackingService.cs (2)
17private readonly Workspace _workspace; 20private FirstDocumentIsActiveAndVisibleDocumentTrackingService(Workspace workspace)
Formatting\CoreFormatterTestsBase.cs (2)
213internal void AssertFormatWithTransformation(Workspace workspace, string expected, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, SyntaxNode root, IEnumerable<TextSpan> spans) 226internal void AssertFormat(Workspace workspace, string expected, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, ITextBuffer clonedBuffer, SyntaxNode root, IEnumerable<TextSpan> spans)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
413protected static void AddMappedDocument(Workspace workspace, string markup)
NavigateTo\AbstractNavigateToTests.cs (2)
235private readonly Workspace _workspace; 238private FirstDocIsVisibleDocumentTrackingService(Workspace workspace)
RenameTracking\MockRefactorNotifyService.cs (2)
22public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure) 34public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure)
Workspaces\MefTestWorkspace.cs (1)
13[Export(typeof(Workspace))]
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (11)
Intellisense\TestState.vb (3)
78Me.CompleteStatementCommandHandler = Workspace.ExportProvider.GetCommandHandler(Of CompleteStatementCommandHandler)(NameOf(CompleteStatementCommandHandler)) 252Dim asynchronousOperationListenerProvider = Workspace.ExportProvider.GetExportedValue(Of AsynchronousOperationListenerProvider)() 265Dim threadingContext = Workspace.ExportProvider.GetExportedValue(Of IThreadingContext)()
Utilities\GoToHelpers\MockDocumentNavigationService.vb (4)
28Public Function CanNavigateToPositionAsync(workspace As Workspace, documentId As DocumentId, position As Integer, virtualSpace As Integer, allowInvalidPosition As Boolean, cancellationToken As CancellationToken) As Task(Of Boolean) Implements IDocumentNavigationService.CanNavigateToPositionAsync 32Public Function CanNavigateToSpanAsync(workspace As Workspace, documentId As DocumentId, textSpan As TextSpan, allowInvalidSpan As Boolean, cancellationToken As CancellationToken) As Task(Of Boolean) Implements IDocumentNavigationService.CanNavigateToSpanAsync 36Public Function GetLocationForPositionAsync(workspace As Workspace, documentId As DocumentId, position As Integer, virtualSpace As Integer, allowInvalidPosition As Boolean, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements IDocumentNavigationService.GetLocationForPositionAsync 47Public Function GetLocationForSpanAsync(workspace As Workspace, documentId As DocumentId, textSpan As TextSpan, allowInvalidSpan As Boolean, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements IDocumentNavigationService.GetLocationForSpanAsync
Utilities\MockDocumentNavigationServiceProvider.vb (4)
45Public Function CanNavigateToPosition(workspace As Workspace, documentId As DocumentId, position As Integer, virtualSpace As Integer, allowInvalidPosition As Boolean, cancellationToken As CancellationToken) As Task(Of Boolean) Implements IDocumentNavigationService.CanNavigateToPositionAsync 53Public Function CanNavigateToSpanAsync(workspace As Workspace, documentId As DocumentId, textSpan As TextSpan, allowInvalidSpan As Boolean, cancellationToken As CancellationToken) As Task(Of Boolean) Implements IDocumentNavigationService.CanNavigateToSpanAsync 60Public Function GetLocationForPositionAsync(workspace As Workspace, documentId As DocumentId, position As Integer, virtualSpace As Integer, allowInvalidPosition As Boolean, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements IDocumentNavigationService.GetLocationForPositionAsync 68Public Function GetLocationForSpanAsync(workspace As Workspace, documentId As DocumentId, textSpan As TextSpan, allowInvalidSpans As Boolean, cancellationToken As CancellationToken) As Task(Of INavigableLocation) Implements IDocumentNavigationService.GetLocationForSpanAsync
Microsoft.CodeAnalysis.EditorFeatures.Text (9)
Extensions.cs (9)
51public static Workspace? GetWorkspace(this ITextBuffer buffer) 54if (Workspace.TryGetWorkspace(container, out var workspace)) 63/// Gets the <see cref="Document"/>s from the corresponding <see cref="Workspace.CurrentSolution"/> that are associated with the <see cref="ITextSnapshot"/>'s buffer, 71/// Gets the <see cref="Document"/> from the corresponding <see cref="Workspace.CurrentSolution"/> that is associated with the <see cref="ITextSnapshot"/>'s buffer 73/// associated with the buffer if it is linked into multiple projects or is part of a Shared Project. In this case, the <see cref="Workspace"/> 83/// Gets the <see cref="Document"/>s from the corresponding <see cref="Workspace.CurrentSolution"/> that are associated with the <see cref="ITextBuffer"/>. 90=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out var workspace) &&
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
44private static IGlobalOptionService GetGlobalOptions(Workspace workspace) 47private static void OpenDocumentAndMakeActive(Document document, Workspace workspace)
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (1)
21private static IGlobalOptionService GetGlobalOptions(Workspace workspace)
InheritanceMargin\InheritanceMarginTests.cs (1)
139private static async Task VerifyInheritanceTargetAsync(Workspace workspace, TestInheritanceTargetItem expectedTarget, InheritanceTargetItem actualTarget)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (48)
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.cs (2)
65protected abstract TTag? CreateTag(Workspace workspace, DiagnosticData diagnostic); 102protected TagSpan<TTag>? CreateTagSpan(Workspace workspace, SnapshotSpan span, DiagnosticData data)
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
107var workspace = project.Solution.Workspace;
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
53protected override InlineDiagnosticsTag? CreateTag(Workspace workspace, DiagnosticData diagnostic)
InlineRename\UI\InlineRenameAdornmentManager.cs (4)
176private static bool ViewIncludesBufferFromWorkspace(IWpfTextView textView, Workspace workspace) 182private static Workspace? GetWorkspace(SourceTextContainer textContainer) 184Workspace.TryGetWorkspace(textContainer, out var workspace);
Interactive\AbstractInteractiveWindowCommandCompletionProvider.cs (2)
29if (Workspace.TryGetWorkspace(sourceText.Container, out var workspace))
Interactive\InteractiveDocumentNavigationService.cs (2)
27public override Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 30public override async Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken)
Interactive\InteractiveGlobalUndoServiceFactory.cs (4)
34public bool IsGlobalTransactionOpen(Workspace workspace) 40public bool CanUndo(Workspace workspace) 46public IWorkspaceGlobalUndoTransaction OpenGlobalUndoTransaction(Workspace workspace, string description) 60private ITextUndoHistory GetHistory(Workspace workspace)
Interactive\InteractiveTextUndoHistoryWorkspaceServiceFactory.cs (1)
37public bool TryGetTextUndoHistory(Workspace editorWorkspace, ITextBuffer textBuffer, out ITextUndoHistory undoHistory)
NavigateTo\NavigateToItemProvider.cs (2)
21private readonly Workspace _workspace; 29Workspace workspace,
Peek\DefinitionPeekableItem.cs (3)
19private readonly Workspace _workspace; 27Workspace workspace, ProjectId projectId, SymbolKey symbolKey, 69var workspace = _peekableItem._workspace;
Peek\PeekableItemSource.cs (1)
127var workspace = project.Solution.Workspace;
Peek\PeekHelpers.cs (1)
47internal static LinePositionSpan GetEntityOfInterestSpan(ISymbol symbol, Workspace workspace, Location identifierLocation, CancellationToken cancellationToken)
QuickInfo\Extensions.cs (1)
21public static ITextBuffer CreateTextBufferWithRoslynContentType(this SourceText sourceText, Workspace workspace)
Suggestions\Copilot\FlavoredSuggestedAction.cs (1)
29Workspace workspace,
Suggestions\FixAll\FixAllGetFixesService.cs (1)
18protected override Solution? GetChangedSolution(Workspace workspace, Solution currentSolution, Solution newSolution, string fixAllPreviewChangesTitle, string fixAllTopLevelHeader, Glyph glyph)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (3)
28Workspace workspace, 46Workspace workspace, 64Workspace workspace,
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (2)
20private readonly Workspace _workspace; 24public PreviewChangesCodeAction(Workspace workspace, CodeAction originalCodeAction, Func<CancellationToken, Task<SolutionPreviewResult?>> getPreviewResultAsync)
Suggestions\PreviewChanges\PreviewChangesSuggestedAction.cs (1)
23Workspace workspace,
Suggestions\RefineUsingCopilot\RefineUsingCopilotCodeAction.cs (1)
94internal override async Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
Suggestions\RefineUsingCopilot\RefineUsingCopilotSuggestedAction.cs (1)
29Workspace workspace,
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (1)
29Workspace workspace,
Suggestions\SuggestedActions\CodeFixSuggestedAction.cs (1)
28Workspace workspace,
Suggestions\SuggestedActions\CodeRefactoringSuggestedAction.cs (1)
26Workspace workspace,
Suggestions\SuggestedActions\FixAllCodeFixSuggestedAction.cs (1)
26Workspace workspace,
Suggestions\SuggestedActions\FixAllCodeRefactoringSuggestedAction.cs (1)
23Workspace workspace,
Suggestions\SuggestedActions\SuggestedAction.cs (2)
41protected readonly Workspace Workspace; 53Workspace workspace,
Suggestions\SuggestedActionsSource.State.cs (2)
25public Workspace? Workspace => Registration.Workspace; 34Registration = Workspace.GetWorkspaceRegistration(textBuffer.AsTextContainer());
Suggestions\SuggestedActionsSource_Async.cs (1)
211var workspace = document.Project.Solution.Workspace;
Suggestions\SuggestedActionWithNestedActions.cs (2)
30Workspace workspace, 45Workspace workspace,
Suggestions\SuggestedActionWithNestedFlavors.cs (1)
43Workspace workspace,
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (12)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
36Friend MustOverride Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider) 135Public Shared Sub AddAnalyzerToWorkspace(workspace As Workspace, analyzer As DiagnosticAnalyzer)
Diagnostics\AddImport\AddImportCrossLanguageTests.vb (1)
23Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
21Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\AddMissingReference\AddMissingReferenceTests.vb (1)
29Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\DiagnosticServiceTests.vb (1)
54Public Overrides Function LoadTextAndVersionAsync(workspace As Workspace, documentId As DocumentId, cancellationToken As CancellationToken) As Task(Of TextAndVersion)
Diagnostics\GenerateEvent\GenerateEventCrossLanguageTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateConstructorCrossLanguageTests.vb (1)
12Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateMethodCrossLanguageTests.vb (1)
19Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\GenerateFromUsage\GenerateVariableCrossLanguageTests.vb (1)
21Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\ImplementInterface\ImplementInterfaceCrossLanguageTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\UseAutoProperty\UseAutoPropertyTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace, language As String) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.ExternalAccess.Apex (1)
ApexAsynchronousOperationListenerProviderAccessor.cs (1)
19private readonly Workspace? _workspace;
Microsoft.CodeAnalysis.ExternalAccess.FSharp (18)
Completion\FSharpCompletionServiceWithProviders.cs (1)
14internal FSharpCompletionServiceWithProviders(Workspace workspace)
Diagnostics\IFSharpDiagnosticAnalyzerService.cs (1)
16void Reanalyze(Workspace workspace, IEnumerable<ProjectId> projectIds = null, IEnumerable<DocumentId> documentIds = null, bool highPriority = false);
Editor\IFSharpEditorInlineRenameService.cs (2)
135bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText); 141bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText);
Editor\InlineRename\FSharpInlineRenameInfo.cs (2)
57bool IInlineRenameInfo.TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) 60bool IInlineRenameInfo.TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText)
Internal\Diagnostics\FSharpDiagnosticAnalyzerService.cs (1)
28public void Reanalyze(Workspace workspace, IEnumerable<ProjectId> projectIds = null, IEnumerable<DocumentId> documentIds = null, bool highPriority = false)
Internal\Editor\FSharpEditorInlineRenameService.cs (2)
170public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) 175public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText)
Internal\Editor\FSharpNavigationBarItemService.cs (1)
69var workspace = document.Project.Solution.Workspace;
Navigation\FSharpDocumentNavigationService.cs (4)
23public bool CanNavigateToSpan(Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 30public bool CanNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken) 37public bool TryNavigateToSpan(Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 45public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken)
Navigation\IFSharpDocumentNavigationService.cs (4)
17bool CanNavigateToSpan(Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken); 19bool CanNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken); 22bool TryNavigateToSpan(Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken); 24bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Options\OmniSharpSolutionAnalyzerConfigOptionsUpdater.cs (2)
16using Workspace = CodeAnalysis.Workspace; 20internal static bool UpdateOptions(Workspace workspace, OmniSharpEditorConfigOptions editorConfigOptions)
Microsoft.CodeAnalysis.ExternalAccess.Razor (7)
Cohost\Handlers\FindAllReferences.cs (1)
20public static async Task<SumType<VSInternalReferenceItem, Location>[]?> FindReferencesAsync(Workspace workspace, Document document, LinePosition linePosition, bool supportsVSExtensions, CancellationToken cancellationToken)
Cohost\Handlers\GoToDefinition.cs (1)
18public static Task<Location[]?> GetDefinitionsAsync(Workspace workspace, Document document, bool typeOnly, LinePosition linePosition, CancellationToken cancellationToken)
Cohost\RazorCohostRequestContext.cs (1)
16internal Workspace? Workspace => context.Workspace;
IRazorDocumentOperationService.cs (1)
10/// document version of <see cref="Workspace.CanApplyChange(ApplyChangesKind)"/>
RazorGlobalOptions.cs (1)
49public static RazorGlobalOptions GetGlobalOptions(Workspace workspace)
Testing\RazorTestAnalyzerLoader.cs (1)
22public void InitializeDiagnosticsServices(Workspace workspace)
Testing\RazorTestWorkspaceRegistrationService.cs (1)
25public new void Register(Workspace workspace)
Microsoft.CodeAnalysis.Features (84)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
71public override void Apply(Workspace workspace, CancellationToken cancellationToken) 81Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 90private ApplyChangesOperation? GetApplyChangesOperation(Workspace workspace) 104private string? ResolvePath(Workspace workspace)
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (1)
111Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
AddImport\CodeActions\InstallWithPackageManagerCodeAction.cs (1)
43public override void Apply(Workspace workspace, CancellationToken cancellationToken)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (3)
63public override void Apply(Workspace workspace, CancellationToken cancellationToken) 72Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 80private bool CanApply(Workspace workspace)
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
68Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
AddPackage\InstallWithPackageManagerCodeAction.cs (1)
38public override void Apply(Workspace workspace, CancellationToken cancellationToken)
ChangeSignature\ChangeSignatureCodeActionOperation.cs (2)
31Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 36private bool ApplyWorker(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
23Workspace workspace, 38Workspace workspace,
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (2)
19Workspace workspace, 104Workspace workspace,
CodeFixesAndRefactorings\FeaturesFixAllGetFixesService.cs (1)
17protected override Solution? GetChangedSolution(Workspace workspace, Solution currentSolution, Solution newSolution, string fixAllPreviewChangesTitle, string fixAllTopLevelHeader, Glyph glyph)
CodeFixesAndRefactorings\IFixAllGetFixesService.cs (1)
30Workspace workspace,
Common\DocumentNavigationOperation.cs (1)
25public override void Apply(Workspace workspace, CancellationToken cancellationToken)
Common\StartInlineRenameSessionOperation.cs (1)
25public override void Apply(Workspace workspace, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (1)
40var workspace = workspaceServices.Workspace;
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (2)
34private readonly Workspace _workspace; 55Workspace workspace)
Diagnostics\IDiagnosticAnalyzerService.cs (1)
49Task<ImmutableArray<DiagnosticData>> GetCachedDiagnosticsAsync(Workspace workspace, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken);
DocumentSpanExtensions.cs (2)
14private static (Workspace workspace, IDocumentNavigationService service) GetNavigationParts(DocumentSpan documentSpan) 17var workspace = solution.Workspace;
ExternalAccess\UnitTesting\API\IUnitTestingStackTraceServiceAccessor.cs (4)
14Task<ImmutableArray<UnitTestingParsedFrameWrapper>> TryParseAsync(string input, Workspace workspace, CancellationToken cancellationToken); 15Task<UnitTestingDefinitionItemWrapper?> TryFindMethodDefinitionAsync(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame, CancellationToken cancellationToken); 16(Document? document, int lineNumber) GetDocumentAndLine(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame); 17Task<bool> TryNavigateToAsync(Workspace workspace, UnitTestingDefinitionItemWrapper definitionItem, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken);
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingSolutionCrawlerService.cs (3)
17/// in given <see cref="Workspace"/> with given <see cref="IUnitTestingIncrementalAnalyzer"/>. 22/// Get <see cref="IUnitTestingSolutionCrawlerProgressReporter"/> for the given <see cref="Workspace"/> 24IUnitTestingSolutionCrawlerProgressReporter GetProgressReporter(Workspace workspace);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
37/// cref="Workspace.CurrentSolution"/> normally represents.
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerService.cs (1)
39public IUnitTestingSolutionCrawlerProgressReporter GetProgressReporter(Workspace workspace)
ExternalAccess\UnitTesting\UnitTestingStackTraceServiceAccessor.cs (4)
22public (Document? document, int lineNumber) GetDocumentAndLine(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame) 25public async Task<UnitTestingDefinitionItemWrapper?> TryFindMethodDefinitionAsync(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame, CancellationToken cancellationToken) 33public async Task<ImmutableArray<UnitTestingParsedFrameWrapper>> TryParseAsync(string input, Workspace workspace, CancellationToken cancellationToken) 39public async Task<bool> TryNavigateToAsync(Workspace workspace, UnitTestingDefinitionItemWrapper definitionItem, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\IVSTypeScriptDiagnosticAnalyzerService.cs (1)
17void Reanalyze(Workspace? workspace = null, IEnumerable<ProjectId>? projectIds = null, IEnumerable<DocumentId>? documentIds = null, bool highPriority = false);
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionServiceWithProviders.cs (1)
18internal VSTypeScriptCompletionServiceWithProviders(Workspace workspace)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (4)
20public static VSTypeScriptDocumentNavigationServiceWrapper Create(Workspace workspace) 25public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace = 0, OptionSet? options = null) 29public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, OptionSet? options, CancellationToken cancellationToken) 41public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptDiagnosticAnalyzerService.cs (1)
22public void Reanalyze(Workspace? workspace, IEnumerable<ProjectId>? projectIds, IEnumerable<DocumentId>? documentIds, bool highPriority)
FindUsages\DefinitionItem.cs (3)
147public Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken) 151public async Task<bool> TryNavigateToAsync(Workspace workspace, NavigationOptions options, CancellationToken cancellationToken) 158public abstract Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
38public override async Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
102public override void Apply(Workspace workspace, CancellationToken cancellationToken)
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
64Workspace sourceWorkspace,
MetadataAsSource\IMetadataAsSourceFileProvider.cs (1)
22Workspace sourceWorkspace,
MetadataAsSource\IMetadataAsSourceFileService.cs (2)
28Workspace sourceWorkspace, 49Workspace? TryGetWorkspace();
MetadataAsSource\MetadataAsSourceFileService.cs (2)
70Workspace sourceWorkspace, 300public Workspace? TryGetWorkspace() => _workspace;
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (2)
17public readonly Workspace Workspace; 28public MetadataAsSourceGeneratedFileInfo(string rootPath, Workspace sourceWorkspace, Project sourceProject, INamedTypeSymbol topLevelNamedType, bool signaturesOnly)
Navigation\IDocumentNavigationService.cs (12)
19Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken); 25Task<bool> CanNavigateToPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken); 27Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken); 28Task<INavigableLocation?> GetLocationForPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken); 33public virtual Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 36public virtual Task<bool> CanNavigateToPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 39public virtual Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 42public virtual Task<INavigableLocation?> GetLocationForPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 48public static Task<bool> CanNavigateToSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 51public static Task<bool> CanNavigateToPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) 54public static Task<INavigableLocation?> GetLocationForSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 57public static Task<INavigableLocation?> GetLocationForPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken)
Navigation\INavigableItem.cs (1)
51public record NavigableDocument(NavigableProject Project, string Name, string? FilePath, IReadOnlyList<string> Folders, DocumentId Id, SourceGeneratedDocumentIdentity? SourceGeneratedDocumentIdentity, Workspace? Workspace)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
81Workspace sourceWorkspace, 307private ProjectInfo? CreateProjectInfo(Workspace workspace, Project project, ImmutableDictionary<string, string> pdbCompilationOptions, string assemblyName, string assemblyVersion, SourceHashAlgorithm checksumAlgorithm) 339SourceFileInfo?[] sourceFileInfos, Encoding encoding, ProjectId projectId, Workspace sourceWorkspace, Project sourceProject)
ProjectManagement\IProjectManagementService.cs (2)
18IList<string> GetFolders(ProjectId projectId, Workspace workspace); 21string GetDefaultNamespace(Project project, Workspace workspace);
SemanticSearch\SearchCompilationFailureDefinitionItem.cs (1)
39public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
SemanticSearch\SearchExceptionDefinitionItem.cs (1)
40public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
SymbolSearch\Windows\SymbolSearchUpdateEngineFactory.cs (1)
23Workspace workspace,
Workspace\CompileTimeSolutionProvider.cs (1)
66public CompileTimeSolutionProvider(Workspace workspace)
Workspace\MiscellaneousFileUtilities.cs (1)
19Workspace workspace,
Wrapping\WrapItemsAction.cs (1)
93public override void Apply(Workspace workspace, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features.Test.Utilities (5)
Diagnostics\DiagnosticProviderTestUtilities.cs (3)
16Workspace workspace, 27Workspace workspace, 38Workspace workspace,
Diagnostics\TestDiagnosticAnalyzerDriver.cs (1)
28public TestDiagnosticAnalyzerDriver(Workspace workspace, bool includeSuppressedDiagnostics = false, bool includeNonLocalDocumentDiagnostics = false)
EditAndContinue\MockHostWorkspaceProvider.cs (1)
15public Workspace Workspace { get; set; } = null!;
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
69var remoteWorkspace = client.TestData.WorkspaceManager.GetWorkspace();
Microsoft.CodeAnalysis.LanguageServer (3)
HostWorkspace\LanguageServerWorkspace.cs (1)
14/// our <see cref="Workspace.CurrentSolution"/> to stay in sync with all the document changes.
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
51public Workspace Workspace { get; }
HostWorkspace\Razor\RazorWorkspaceListenerInitializer.cs (1)
16private readonly Workspace _workspace;
Microsoft.CodeAnalysis.LanguageServer.Protocol (67)
Features\Diagnostics\DiagnosticAnalyzerService.cs (3)
38private readonly ConditionalWeakTable<Workspace, DiagnosticIncrementalAnalyzer> _map = new(); 39private readonly ConditionalWeakTable<Workspace, DiagnosticIncrementalAnalyzer>.CreateValueCallback _createIncrementalAnalyzer; 101public Task<ImmutableArray<DiagnosticData>> GetCachedDiagnosticsAsync(Workspace workspace, ProjectId? projectId, DocumentId? documentId, bool includeSuppressedDiagnostics, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken)
Features\Diagnostics\DiagnosticAnalyzerService_IncrementalAnalyzer.cs (2)
13public DiagnosticIncrementalAnalyzer CreateIncrementalAnalyzer(Workspace workspace) 19private DiagnosticIncrementalAnalyzer CreateIncrementalAnalyzerCallback(Workspace workspace)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (2)
32internal Workspace Workspace { get; } 37Workspace workspace,
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (2)
23private readonly Workspace _workspace; 49public StateManager(Workspace workspace, DiagnosticAnalyzerInfoCache analyzerInfoCache)
Features\Options\SolutionAnalyzerConfigOptionsUpdater.cs (4)
32public void StartListening(Workspace workspace, object serviceOpt) 35public void StopListening(Workspace workspace) 40Debug.Assert(target is Workspace); 50_ = ((Workspace)target).SetCurrentSolution(UpdateOptions, changeKind: WorkspaceChangeKind.SolutionChanged);
Features\UnifiedSuggestions\UnifiedSuggestedActions\IUnifiedSuggestedAction.cs (1)
14Workspace Workspace { get; }
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedCodeFixSuggestedAction.cs (1)
24Workspace workspace,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedCodeRefactoringSuggestedAction.cs (1)
22Workspace workspace,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedFixAllCodeFixSuggestedAction.cs (1)
22Workspace workspace,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedFixAllCodeRefactoringSuggestedAction.cs (1)
20Workspace workspace,
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedSuggestedAction.cs (2)
15public Workspace Workspace { get; } 21public UnifiedSuggestedAction(Workspace workspace, CodeAction codeAction, CodeActionPriority codeActionPriority)
Features\UnifiedSuggestions\UnifiedSuggestedActions\UnifiedSuggestedActionWithNestedActions.cs (1)
21Workspace workspace,
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (10)
36Workspace workspace, 65Workspace workspace, 86Workspace workspace, 98Workspace workspace, 128Workspace workspace, 214Workspace workspace, 283Workspace workspace) 434Workspace workspace, 505Workspace workspace, 584Workspace workspace,
Handler\Definitions\AbstractGoToDefinitionHandler.cs (2)
40var workspace = context.Workspace; 50internal static async Task<LSP.Location[]?> GetDefinitionsAsync(IGlobalOptionService globalOptions, IMetadataAsSourceFileService? metadataAsSourceFileService, Workspace workspace, Document document, bool forSymbolType, LinePosition linePosition, CancellationToken cancellationToken)
Handler\PullHandlers\VersionedPullCache.CacheItem.cs (1)
16/// Internal cache item that updates state for a particular <see cref="Workspace"/> and <see cref="ProjectOrDocumentId"/> in <see cref="VersionedPullCache{TCheapVersion, TExpensiveVersion, TState, TComputedData}"/>
Handler\PullHandlers\VersionedPullCache.cs (2)
29private readonly ConcurrentDictionary<(Workspace workspace, ProjectOrDocumentId id), CacheItem> _idToLastReportedResult = []; 78var workspace = project.Solution.Workspace;
Handler\References\FindAllReferencesHandler.cs (2)
55var workspace = context.Workspace; 71Workspace workspace,
Handler\References\FindUsagesLSPContext.cs (2)
34private readonly Workspace _workspace; 77Workspace workspace,
Handler\RequestContext.cs (5)
56private readonly StrongBox<(Workspace Workspace, Solution Solution, TextDocument? Document)>? _lspSolution; 64public Workspace? Workspace 171Workspace? workspace, 187_lspSolution = new StrongBox<(Workspace Workspace, Solution Solution, TextDocument? Document)>((workspace, solution, document)); 261Workspace? workspace = null;
Workspaces\ILspWorkspace.cs (1)
27/// cref="Workspace.OnDocumentTextChanged(Document)"/>). However, they will be overwritten by the <see
Workspaces\LspWorkspaceManager.cs (12)
105private readonly Dictionary<Workspace, (int? forkedFromVersion, Solution solution)> _cachedLspSolutions = []; 142private static async ValueTask ApplyChangeToMutatingWorkspaceAsync(Workspace workspace, Uri uri, Func<ILspWorkspace, DocumentId, ValueTask> change) 177foreach (var workspace in registeredWorkspaces) 212foreach (var workspace in registeredWorkspaces) 260public async Task<(Workspace?, Solution?)> GetLspSolutionInfoAsync(CancellationToken cancellationToken) 278public async Task<(Workspace?, Solution?, TextDocument?)> GetLspDocumentInfoAsync(TextDocumentIdentifier textDocumentIdentifier, CancellationToken cancellationToken) 328private async Task<ImmutableArray<(Workspace workspace, Solution Solution, bool IsForked)>> GetLspSolutionsAsync(CancellationToken cancellationToken) 337var solutions = new FixedSizeArrayBuilder<(Workspace, Solution, bool)>(registeredWorkspaces.Length); 338foreach (var workspace in registeredWorkspaces) 350async Task<(Solution Solution, bool IsForked)> GetLspSolutionForWorkspaceAsync(Workspace workspace, CancellationToken cancellationToken) 440async ValueTask TryOpenAndEditDocumentsInMutatingWorkspaceAsync(Workspace workspace) 585public bool IsWorkspaceRegistered(Workspace workspace)
Workspaces\LspWorkspaceRegistrationEventListener.cs (2)
30public void StartListening(Workspace workspace, object _) 35public void StopListening(Workspace workspace)
Workspaces\LspWorkspaceRegistrationService.cs (7)
15private ImmutableArray<Workspace> _registrations = []; 17public ImmutableArray<Workspace> GetAllRegistrations() 25public virtual void Register(Workspace? workspace) 47public void Deregister(Workspace? workspace) 68foreach (var workspace in _registrations) 87public Workspace Workspace { get; } 89public LspWorkspaceRegisteredEventArgs(Workspace workspace)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Definitions\GoToTypeDefinitionTests.cs (1)
282private static async Task<Workspace> GetWorkspaceForDocument(TestLspServer testLspServer, Uri fileUri)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
122private static async Task<Workspace> GetWorkspaceForDocument(TestLspServer testLspServer, Uri fileUri)
Workspaces\LspWorkspaceManagerTests.cs (3)
764private static bool IsWorkspaceRegistered(Workspace workspace, TestLspServer testLspServer) 769private static async Task<(Workspace? workspace, Document? document)> GetLspWorkspaceAndDocumentAsync(Uri uri, TestLspServer testLspServer) 775private static Task<(Workspace?, Solution?)> GetLspHostWorkspaceAndSolutionAsync(TestLspServer testLspServer)
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
ExternalAccess\Razor\Api\RazorBrokeredServiceImplementation.cs (1)
24public static Workspace GetWorkspace()
Host\RemoteWorkspace.cs (2)
239/// cref="Workspace.CurrentSolution"/> of this <see cref="RemoteWorkspace"/> is the responsibility of any 247/// fork off of <see cref="Workspace.CurrentSolution"/> if possible. The latter is almost always what will
Host\RemoteWorkspaceManager.cs (1)
42/// cref="Workspace.CurrentSolution"/> of the workspace it is created against (as well as any recent in-flight
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
86Workspace workspace,
Microsoft.CodeAnalysis.Remote.Workspaces (1)
VisualStudioMefHostServices.cs (1)
38protected internal override HostWorkspaceServices CreateWorkspaceServices(Workspace workspace)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (40)
src\Analyzers\VisualBasic\Tests\AddAnonymousTypeMemberName\AddAnonymousTypeMemberNameTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddExplicitCast\AddExplicitCastTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddObsoleteAttribute\AddObsoleteAttributeTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AddParameter\AddParameterTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\AliasAmbiguousType\AliasAmbiguousTypeTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ConvertToAsync\ConvertToAsyncTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\DocumentationComments\RemoveDocCommentNodeCodeFixProviderTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateConstructor\GenerateConstructorTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateEnumMember\GenerateEnumMemberTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\GenerateMethod\GenerateConversionTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ImplementAbstractClass\ImplementAbstractClassTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ImplementInterface\ImplementInterfaceTests.vb (1)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeFieldReadonly\MakeFieldReadonlyTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeMethodAsynchronous\MakeMethodAsynchronousTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\MakeTypeAbstract\MakeTypeAbstractTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\NamingStyles\NamingStylesTests.vb (1)
19Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\OrderModifiers\OrderModifiersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\PopulateSwitch\PopulateSwitchStatementTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\QualifyMemberAccess\QualifyMemberAccessTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryCast\RemoveUnnecessaryCastTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryImports\RemoveUnnecessaryImportsTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryParenthesesTests.vb (1)
25Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedMembers\RemoveUnusedMembersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValuesTestsBase.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\SimplifyBooleanExpression\SimplifyConditionalTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\SimplifyInterpolation\SimplifyInterpolationTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UnsealClass\UnsealClassTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseAutoProperty\UseAutoPropertyTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCollectionInitializer\UseCollectionInitializerTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseCompoundAssignment\UseCompoundAssignmentTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseConditionalExpression\UseConditionalExpressionForAssignmentTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseConditionalExpression\UseConditionalExpressionForReturnTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseInferredMemberName\UseInferredMemberNameTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseIsNullCheck\UseIsNullCheckForReferenceEqualsTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseNullPropagation\UseNullPropagationTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\UseSystemHashCode\UseSystemHashCodeTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
src\Analyzers\VisualBasic\Tests\ValidateFormatString\ValidateFormatStringTests.vb (1)
16workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (33)
CorrectNextControlVariable\CorrectNextControlVariableTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Diagnostics\Configuration\ConfigureCodeStyle\BooleanCodeStyleOptionConfigurationTests.vb (1)
28Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)
Diagnostics\Configuration\ConfigureSeverity\CodeStyleOptionBasedSeverityConfigurationTests.vb (1)
28Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
52Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)
Diagnostics\Configuration\ConfigureSeverity\MultipleCodeStyleOptionBasedConfigureSeverityTests.vb (1)
27Friend Overrides Function CreateDiagnosticProviderAndFixer(ByVal workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)
Diagnostics\Suppression\SuppressionAllCodeTests.vb (1)
26Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of Analyzer, IConfigurationFixProvider)
Diagnostics\Suppression\SuppressionTests.vb (10)
47Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 672Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 715Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 790Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 834Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 900Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 957Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 978Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 1049Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider) 1765Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As Tuple(Of DiagnosticAnalyzer, IConfigurationFixProvider)
EmbeddedLanguages\ValidateJsonStringTests.vb (1)
22Friend Overrides Function CreateDiagnosticProviderAndFixer(Workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
EmbeddedLanguages\ValidateRegexStringTests.vb (1)
17Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
ExitContinue\ExitContinueCodeActionTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
FixIncorrectFunctionReturnType\FixIncorrectFunctionReturnTypeTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
FullyQualify\FullyQualifyTests.vb (2)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) 855Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateEndConstruct\GenerateEndConstructTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateEvent\GenerateEventTests.vb (1)
15Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateMethod\GenerateMethodTests.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
GenerateVariable\GenerateVariableTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
MoveToTopOfFile\MoveToTopOfFileTests.vb (1)
13Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
PreferFrameworkType\PreferFrameworkTypeTests.vb (1)
22Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
RemoveUnusedVariable\RemoveUnusedVariableTest.vb (1)
14Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SimplifyThisOrMe\SimplifyThisOrMeTests.vb (1)
16Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SimplifyTypeNames\SimplifyTypeNamesTests.vb (1)
22Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
SpellCheck\SpellCheckTests.vb (2)
18Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider) 500Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
Formatting\VisualBasicFormattingTestBase.vb (2)
20Private _ws As Workspace 22Protected ReadOnly Property DefaultWorkspace As Workspace
Microsoft.CodeAnalysis.Workspaces (106)
Classification\Classifier.cs (1)
50Workspace workspace,
CodeActions\Operations\ApplyChangesOperation.cs (3)
40public override void Apply(Workspace workspace, CancellationToken cancellationToken) 43internal sealed override Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 47Workspace workspace,
CodeActions\Operations\CodeActionOperation.cs (2)
26public virtual void Apply(Workspace workspace, CancellationToken cancellationToken) 34internal virtual Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
CodeActions\Operations\OpenDocumentOperation.cs (1)
17public override void Apply(Workspace workspace, CancellationToken cancellationToken)
Editing\SyntaxEditor.cs (1)
64public SyntaxEditor(SyntaxNode root, Workspace workspace)
Editing\SyntaxGenerator.cs (1)
59public static SyntaxGenerator GetGenerator(Workspace workspace, string language)
ExternalAccess\UnitTesting\Api\UnitTestingWorkspaceExtensions.cs (4)
11public static IDisposable RegisterTextDocumentOpenedEventHandler(this Workspace workspace, Action<UnitTestingTextDocumentEventArgsWrapper> action) 14public static IDisposable RegisterTextDocumentClosedEventHandler(this Workspace workspace, Action<UnitTestingTextDocumentEventArgsWrapper> action) 19private readonly Workspace _workspace; 23internal EventHandlerWrapper(Workspace workspace, Action<UnitTestingTextDocumentEventArgsWrapper> action, bool opened)
FindSymbols\SymbolFinder.cs (3)
23/// Obsolete. Use <see cref="FindSymbolAtPositionAsync(SemanticModel, int, Workspace, CancellationToken)"/>. 29Workspace workspace, 45Workspace workspace,
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
34private readonly Workspace _workspace; 43public SymbolTreeInfoCacheService(Workspace workspace, IAsynchronousOperationListener listener)
Formatting\Formatter.cs (12)
151public static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 157private static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 188public static SyntaxNode Format(SyntaxNode node, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 203public static SyntaxNode Format(SyntaxNode node, TextSpan span, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 218public static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 221private static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 230private static IFormattingResult? GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 268public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 283public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, TextSpan span, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 298public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 304private static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 318internal static SyntaxFormattingOptions GetFormattingOptions(Workspace workspace, OptionSet? optionSet, string language)
Options\ILegacyWorkspaceOptionService.cs (4)
12/// Only used by <see cref="Workspace"/> and <see cref="SolutionOptionSet"/> to implement legacy public APIs: 13/// <see cref="Workspace.Options"/> and <see cref="Solution.Options"/>. 24void RegisterWorkspace(Workspace workspace); 25void UnregisterWorkspace(Workspace workspace);
Packaging\IPackageInstallerService.cs (1)
22Workspace workspace, DocumentId documentId,
Recommendations\Recommender.cs (2)
22Workspace workspace, 38Workspace workspace,
Remote\RemoteHostClient.cs (2)
22public static Task WaitForClientCreationAsync(Workspace workspace, CancellationToken cancellationToken) 41public static Task<RemoteHostClient?> TryGetClientAsync(Workspace workspace, CancellationToken cancellationToken)
Shared\Extensions\ISolutionExtensions.cs (1)
78public static Workspace? TryGetWorkspace(this Solution solution)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
115public async Task WaitAllAsync(Workspace? workspace, string[]? featureNames = null, Action? eventProcessingAction = null, TimeSpan? timeout = null)
Simplification\Simplifier.cs (2)
81public static TNode Expand<TNode>(TNode node, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 126public static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
98var workspace = document.Project.Solution.Workspace;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
23private readonly Workspace _workspace; 40public MefWorkspaceServices(IMefHostExportProvider host, Workspace workspace) 62public override Workspace Workspace
Workspace\CommandLineProject.cs (2)
23public static ProjectInfo CreateProjectInfo(string projectName, string language, IEnumerable<string> commandLineArgs, string projectDirectory, Workspace? workspace = null) 182public static ProjectInfo CreateProjectInfo(string projectName, string language, string commandLine, string baseDirectory, Workspace? workspace = null)
Workspace\Host\DocumentService\IDocumentOperationService.cs (1)
16/// document version of <see cref="Workspace.CanApplyChange(ApplyChangesKind)"/>
Workspace\Host\EventListener\EventListenerTracker.cs (1)
28public void EnsureEventListener(Workspace workspace, TService serviceOpt)
Workspace\Host\EventListener\IEventListener`1.cs (1)
16void StartListening(Workspace workspace, TService serviceOpt);
Workspace\Host\EventListener\IEventListenerStoppable.cs (1)
17void StopListening(Workspace workspace);
Workspace\Host\EventListener\IWorkspaceEventListenerProvider.cs (3)
16/// Ensure <see cref="IEventListener{TService}.StartListening(Workspace, TService)"/> is called for the workspace 32var workspace = workspaceServices.Workspace; 36internal sealed class Service(Workspace workspace, IEnumerable<IEventListener<object>> eventListeners) : IWorkspaceEventListenerService
Workspace\Host\HostServices.cs (1)
17protected internal abstract HostWorkspaceServices CreateWorkspaceServices(Workspace workspace);
Workspace\Host\HostWorkspaceServices.cs (1)
56public abstract Workspace Workspace { get; }
Workspace\Host\IHostWorkspaceProvider.cs (1)
9Workspace Workspace { get; }
Workspace\Host\ISupportedChangesService.cs (4)
17/// <inheritdoc cref="Workspace.CanApplyChange"/> 20/// <inheritdoc cref="Workspace.CanApplyCompilationOptionChange"/> 23/// <inheritdoc cref="Workspace.CanApplyParseOptionChange"/> 39private sealed class DefaultSupportedChangesService(Workspace workspace) : ISupportedChangesService
Workspace\Host\Mef\MefHostServices.cs (1)
55protected internal override HostWorkspaceServices CreateWorkspaceServices(Workspace workspace)
Workspace\ISolutionAnalyzerSetterWorkspaceService.cs (1)
21internal sealed class DefaultSolutionAnalyzerSetterWorkspaceService(Workspace workspace) : ISolutionAnalyzerSetterWorkspaceService
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (5)
47/// The map of <see cref="DocumentId"/> to <see cref="IDynamicFileInfoProvider"/> whose <see cref="DynamicFileInfo"/> got added into <see cref="Workspace"/> 67private readonly Action<Workspace, DocumentInfo> _documentAddAction; 68private readonly Action<Workspace, DocumentId> _documentRemoveAction; 74Action<Workspace, DocumentInfo> documentAddAction, 75Action<Workspace, DocumentId> documentRemoveAction,
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (7)
42public Workspace Workspace { get; } 79Workspace workspace, 220public void ApplyChangeToWorkspace(Action<Workspace> action) 231public async ValueTask ApplyChangeToWorkspaceAsync(Action<Workspace> action, CancellationToken cancellationToken = default) 242public async ValueTask ApplyChangeToWorkspaceMaybeAsync(bool useAsync, Action<Workspace> action) 254public void ApplyChangeToWorkspaceWithProjectUpdateState(Func<Workspace, ProjectUpdateState, ProjectUpdateState> action) 304/// <remarks>This is needed to synchronize with <see cref="ApplyChangeToWorkspace(Action{Workspace})" /> to avoid any races. This
Workspace\Solution\FileTextLoader.cs (3)
68GetType(), _ => new StrongBox<bool>(new Func<Stream, Workspace, SourceText>(CreateText).Method.DeclaringType != typeof(FileTextLoader))).Value; 76protected virtual SourceText CreateText(Stream stream, Workspace? workspace) 90public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken)
Workspace\Solution\Solution.cs (4)
59Workspace workspace, 80/// cref="Workspace.Services"/> when possible. 91public Workspace Workspace 1686/// Returns the options that should be applied to this solution. This is equivalent to <see cref="Workspace.Options" /> when the <see cref="Solution"/>
Workspace\Solution\TextLoader.cs (2)
65_ => new StrongBox<bool>(new Func<Workspace, DocumentId, CancellationToken, Task<TextAndVersion>>(LoadTextAndVersionAsync).Method.DeclaringType != typeof(TextLoader))).Value) 83public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken)
Workspace\TextExtensions.cs (8)
21if (Workspace.TryGetWorkspace(text.Container, out var workspace)) 61if (Workspace.TryGetWorkspace(text.Container, out var workspace)) 108if (Workspace.TryGetWorkspace(container, out var workspace)) 128if (Workspace.TryGetWorkspace(container, out var workspace))
Workspace\Workspace.cs (2)
862/// want to break people who may have derived from <see cref="Workspace"/> and either called it, or overridden it. 1272var @this = data.@this;
Workspace\Workspace.TextTracker.cs (4)
20private readonly Workspace _workspace; 24private readonly Action<Workspace, DocumentId, SourceText, PreservationMode> _onChangedHandler; 27Workspace workspace, 30Action<Workspace, DocumentId, SourceText, PreservationMode> onChangedHandler)
Workspace\Workspace_Editor.cs (2)
494private void SignupForTextChanges(DocumentId documentId, SourceTextContainer textContainer, bool isCurrentContext, Action<Workspace, DocumentId, SourceText, PreservationMode> onChangedHandler) 557Action<Workspace, DocumentId, SourceText, PreservationMode> onDocumentTextChanged)
Workspace\Workspace_Registration.cs (1)
20public static bool TryGetWorkspace(SourceTextContainer textContainer, [NotNullWhen(true)] out Workspace? workspace)
Workspace\WorkspaceRegistration.cs (3)
17public Workspace? Workspace { get; private set; } 21internal void SetWorkspaceAndRaiseEvents(Workspace? workspace) 27internal void SetWorkspace(Workspace? workspace)
Microsoft.CodeAnalysis.Workspaces.Desktop (1)
Workspace\Host\Mef\MefV1HostServices.cs (1)
73protected internal override HostWorkspaceServices CreateWorkspaceServices(Workspace workspace)
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
MSBuild\DiagnosticReporter.cs (2)
15private readonly Workspace _workspace; 17public DiagnosticReporter(Workspace workspace)
MSBuild\MSBuildProjectLoader.cs (2)
60public MSBuildProjectLoader(Workspace workspace, ImmutableDictionary<string, string>? properties = null) 251/// This is useful when populating a custom <see cref="Workspace"/>.</param>
MSBuild\ProjectLoadOperation.cs (1)
26/// needed to populate a <see cref="Workspace"/>.
MSBuild\ProjectMap.cs (2)
16/// project into a custom <see cref="Workspace"/>. To use, pass <see cref="Workspace.CurrentSolution"/> to <see cref="Create(Solution)"/>.
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
VisualStudioMSBuildWorkspaceTests.cs (7)
1319Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1342Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1364Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1387Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1407Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1430Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true; 1463Workspace.TestHookStandaloneProjectsDoNotHoldReferences = true;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (9)
AsynchronousOperationListenerExtensions.cs (1)
13internal static async Task WaitAllDispatcherOperationAndTasksAsync(this IAsynchronousOperationListenerProvider provider, Workspace? workspace, params string[] featureNames)
MEF\UseExportProviderAttribute.cs (1)
226protected internal override HostWorkspaceServices CreateWorkspaceServices(Workspace workspace)
Remote\InProcRemostHostClient.cs (1)
46public static async Task<InProcRemoteHostClient> GetTestClientAsync(Workspace workspace)
WorkspaceExtensions.cs (4)
15public static DocumentId AddDocument(this Workspace workspace, ProjectId projectId, IEnumerable<string> folders, string name, SourceText initialText, SourceCodeKind sourceCodeKind = SourceCodeKind.Regular) 24public static void RemoveDocument(this Workspace workspace, DocumentId documentId) 31public static void UpdateDocument(this Workspace workspace, DocumentId documentId, SourceText newText) 57internal static EventWaiter VerifyWorkspaceChangedEvent(this Workspace workspace, Action<WorkspaceChangeEventArgs> action)
Workspaces\TestHostDocument.cs (1)
41var workspace = LanguageServiceProvider!.WorkspaceServices.Workspace;
WorkspaceTestUtilities.cs (1)
14public static Workspace CreateWorkspaceWithPartialSemantics(Type[]? additionalParts = null, TestHost testHost = TestHost.InProcess)
Microsoft.CodeAnalysis.Workspaces.UnitTests (297)
Editing\SyntaxEditorTests.cs (2)
20private Workspace _emptyWorkspace; 22private Workspace EmptyWorkspace
FindAllDeclarationsTests.cs (31)
94using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 113using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 123var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project, testHost); 132using var workspace = CreateWorkspace(testHost); 155using var workspace = CreateWorkspace(testHost); 260using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 279using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 289using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 365using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 384using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 394using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 416using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 424using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 432using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 451using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 461using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 483using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 491using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 499using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 518using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 528using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 550using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 563using var workspace = CreateWorkspaceWithProject(workspaceKind, out var project); 582using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 592using var workspace = CreateWorkspaceWithProject(SolutionKind.SingleClass, out var project); 614using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 627using var workspace = CreateWorkspaceWithSolution(workspaceKind, out var solution); 646using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 656using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 666using var workspace = CreateWorkspaceWithSolution(SolutionKind.SingleClass, out var solution); 698using var workspace = CreateWorkspace();
FindAllDeclarationsTests.TestSolutionsAndProject.cs (8)
77private Workspace CreateWorkspace(TestHost testHost = TestHost.OutOfProcess) 91private Workspace CreateWorkspaceWithSingleProjectSolution(TestHost testHost, string[] sourceTexts, out Solution solution) 94var workspace = CreateWorkspace(testHost); 108private Workspace CreateWorkspaceWithMultipleProjectSolution(TestHost testHost, string[] sourceTexts, out Solution solution) 110var workspace = CreateWorkspace(testHost); 125private Workspace CreateWorkspaceWithSolution(SolutionKind solutionKind, out Solution solution, TestHost testHost = TestHost.OutOfProcess) 140private Workspace CreateWorkspaceWithProject(SolutionKind solutionKind, out Project project, TestHost testHost = TestHost.OutOfProcess) 142var workspace = CreateWorkspaceWithSolution(solutionKind, out var solution, testHost);
FindReferencesTests.cs (11)
24private static Workspace CreateWorkspace(Type[] additionalParts = null) 59private static Solution GetSingleDocumentSolution(Workspace workspace, string sourceText, string languageName = LanguageNames.CSharp) 69private static Solution GetMultipleDocumentSolution(Workspace workspace, string[] sourceTexts) 101using var workspace = CreateWorkspace(); 119using var workspace = CreateWorkspace(); 321using var workspace = CreateWorkspace(); 431using var workspace = CreateWorkspace(); 511using var workspace = CreateWorkspace(); 538using var workspace = CreateWorkspace(); 571using var workspace = CreateWorkspace(); 613using var workspace = CreateWorkspace();
SolutionTests\ProjectSemanticVersionTests.cs (18)
21using var workspace = CreateWorkspace(); 30using var workspace = CreateWorkspace(); 40using var workspace = CreateWorkspace(); 54using var workspace = CreateWorkspace(); 68using var workspace = CreateWorkspace(); 82using var workspace = CreateWorkspace(); 96using var workspace = CreateWorkspace(); 110using var workspace = CreateWorkspace(); 124using var workspace = CreateWorkspace(); 138using var workspace = CreateWorkspace(); 152using var workspace = CreateWorkspace(); 166using var workspace = CreateWorkspace(); 180using var workspace = CreateWorkspace(); 194using var workspace = CreateWorkspace(); 208using var workspace = CreateWorkspace(); 222using var workspace = CreateWorkspace(); 236using var workspace = CreateWorkspace(); 250using var workspace = CreateWorkspace();
SolutionTests\SolutionTestHelpers.cs (2)
16public static Workspace CreateWorkspace(Type[]? additionalParts = null, TestHost testHost = TestHost.InProcess) 19public static Workspace CreateWorkspaceWithPartialSemantics(TestHost testHost = TestHost.InProcess)
SolutionTests\SolutionTests.cs (171)
52private static Workspace CreateWorkspaceWithProjectAndDocuments(string? editorConfig = null) 56var workspace = CreateWorkspace(); 67private static Workspace CreateWorkspaceWithProjectAndLinkedDocuments( 75var workspace = CreateWorkspace(); 116using var workspace = CreateWorkspace(); 125using var workspace = CreateWorkspace(); 135using var workspace = CreateWorkspace(); 144using var workspace = CreateWorkspace(); 154using var workspace = CreateWorkspace(); 163using var workspace = CreateWorkspace(); 173using var workspace = CreateWorkspaceWithProjectAndDocuments(); 193using var workspace = CreateWorkspaceWithProjectAndDocuments(); 224using var workspace = CreateWorkspaceWithProjectAndDocuments(); 251using var workspace = CreateWorkspaceWithProjectAndDocuments(); 269using var workspace = CreateWorkspaceWithProjectAndDocuments(); 289using var workspace = CreateWorkspaceWithProjectAndDocuments(); 300using var workspace = CreateWorkspaceWithProjectAndDocuments(); 330using var workspace = CreateWorkspace(); 346using var workspace = CreateWorkspaceWithProjectAndDocuments(); 371using var workspace = CreateWorkspaceWithProjectAndDocuments(); 395using var workspace = CreateWorkspaceWithProjectAndDocuments(); 428using var workspace = CreateWorkspaceWithProjectAndLinkedDocuments("public class Goo { }"); 513using var workspace = CreateWorkspaceWithProjectAndLinkedDocuments(""" 592using var workspace = CreateWorkspaceWithProjectAndLinkedDocuments(""" 678using var workspace = CreateWorkspaceWithProjectAndLinkedDocuments(""" 755using var workspace = CreateWorkspaceWithProjectAndLinkedDocuments(""" 836using var workspace = CreateWorkspace(); 917using var workspace = CreateWorkspaceWithProjectAndDocuments(); 939using var workspace = CreateWorkspaceWithProjectAndDocuments(); 963using var workspace = CreateWorkspaceWithProjectAndDocuments(); 985using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1009using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1031using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1053using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1078using var workspace = CreateWorkspace(); 1297using var workspace = CreateWorkspace(); 1332using var workspace = CreateWorkspace(); 1367using var workspace = CreateWorkspace(); 1402using var workspace = CreateWorkspace(); 1437using var workspace = CreateWorkspace(); 1459using var workspace = CreateWorkspace(); 1487using var workspace = CreateWorkspace(); 1514using var workspace = CreateWorkspace(); 1537using var workspace = CreateWorkspace(); 1560using var workspace = CreateWorkspace(); 1583using var workspace = CreateWorkspace(); 1616using var workspace = CreateWorkspace(); 1674using var workspace = CreateWorkspace(); 1697using var workspace = CreateWorkspace(); 1720using var workspace = CreateWorkspace(); 1736using var workspace = CreateWorkspace(); 1762using var workspace = CreateWorkspace(); 1786using var workspace = CreateWorkspace(); 1820using var workspace = CreateWorkspace(); 1858using var workspace = CreateWorkspace(); 1877using var workspace = CreateWorkspace(); 1896using var workspace = CreateWorkspace(); 1912using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1945using var workspace = CreateWorkspaceWithProjectAndDocuments(); 1961using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2003using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2038using var workspace = CreateWorkspace(); 2074using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2092using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2117using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2144using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2162using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2190using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2217using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2231using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2257using var workspace = CreateWorkspaceWithProjectAndDocuments(); 2280using var workspace = CreateWorkspaceWithProjectAndDocuments(editorConfig: $""" 2360using var workspace = CreateWorkspace(); 2385using var workspace = CreateWorkspace(); 2416using var workspace = CreateWorkspace(); 2444using var workspace = CreateWorkspace(); 2473using var workspace = CreateWorkspace(); 2504using var workspace = CreateWorkspace(); 2528using var workspace = CreateWorkspace(); 2541using var workspace = CreateWorkspace(); 2553using var workspace = CreateWorkspace(); 2568using var workspace = CreateWorkspace(); 2614using var workspace = CreateWorkspace(); 2638using var workspace = CreateWorkspace(); 2666using var workspace = CreateWorkspace(); 2676using var workspace = CreateWorkspace(); 2690using var workspace = CreateWorkspace(); 2711using var workspace = CreateWorkspace(); 2732using var workspace = CreateWorkspace(); 2751using var workspace = CreateWorkspace(); 2770using var workspace = CreateWorkspace(); 2784using var workspace = CreateWorkspace(); 2798using var workspace = CreateWorkspace(); 2820using var workspace = CreateWorkspace(); 2921using var workspace = CreateWorkspace(); 2942using var workspace = CreateWorkspace(); 2980using var workspace = CreateWorkspace(); 3038using var workspace = CreateWorkspace(); 3056using var workspace = CreateWorkspace(); 3075using var workspace = CreateWorkspace(); 3101using var workspace = CreateWorkspace(); 3137using var workspace = CreateWorkspace(); 3158using var workspace = CreateWorkspace(); 3181using var workspace = CreateWorkspace(); 3221using var workspace = CreateWorkspace(); 3263using var workspace = CreateWorkspace(); 3294using var workspace = CreateWorkspace(); 3325using var workspace = CreateWorkspace(); 3347using var workspace = CreateWorkspace(); 3368using var workspace = CreateWorkspace(); 3392using var workspace = CreateWorkspace(); 3414using var workspace = CreateWorkspace(); 3435using var workspace = CreateWorkspace(); 3455using var workspace = CreateWorkspace(); 3475using var workspace = CreateWorkspace(); 3495using var workspace = CreateWorkspace(); 3514using var workspace = CreateWorkspace(); 3545using var workspace = CreateWorkspace(); 3577using var workspace = CreateWorkspace(); 3603using var workspace = CreateWorkspace(); 3637using var workspace = CreateWorkspace(); 3667using var workspace = CreateWorkspace(); 3718using var workspace = CreateWorkspace(); 3743using var workspace = CreateWorkspace(); 3766using var workspace = CreateWorkspace(); 4072using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 4097using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 4125using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 4170using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 4248using var workspace = CreateWorkspaceWithPartialSemantics(); 4266using var workspace = CreateWorkspaceWithPartialSemantics(); 4282using var workspace = CreateWorkspaceWithPartialSemantics(); 4306using var workspace = CreateWorkspaceWithPartialSemantics(); 4334using var workspace = CreateWorkspaceWithPartialSemantics(); 4350using var workspace = CreateWorkspaceWithPartialSemantics(); 4387using var workspace = CreateWorkspaceWithPartialSemantics(); 4546using var workspace = CreateWorkspace(); 4562using var workspace = CreateWorkspace(); 4633using var workspace = CreateWorkspace(); 4670using var workspace = CreateWorkspace(); 4706using var workspace = CreateWorkspace(); 4747using var workspace = CreateWorkspace(); 4793using var workspace = CreateWorkspace(); 4824using var workspace = CreateWorkspace(); 4934using var workspace = CreateWorkspace(); 4957using var workspace = CreateWorkspace(); 4979using var workspace = CreateWorkspace(); 5007using var workspace = CreateWorkspace(); 5035using var workspace = CreateWorkspace(); 5064using var workspace = CreateWorkspace(); 5095using var workspace = CreateWorkspace(); 5133using var workspace = CreateWorkspace(); 5150using var workspace = CreateWorkspace(); 5196using var workspace = CreateWorkspace(); 5240using var workspace = CreateWorkspace(); 5264using var workspace = CreateWorkspace(additionalParts: [typeof(NoCompilationLanguageService)]); 5385using var workspace = CreateWorkspace(); 5419using var workspace = CreateWorkspace(); 5459using var workspace = CreateWorkspaceWithProjectAndDocuments(); 5502using var workspace = CreateWorkspace(); 5539using var workspace = CreateWorkspace(); 5561using var workspace = CreateWorkspace(); 5576using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5593using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5613using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5641using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5671using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5704using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5729using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5781using var workspace = WorkspaceTestUtilities.CreateWorkspaceWithPartialSemantics(); 5801using var workspace = CreateWorkspace();
SolutionTests\SolutionWithSourceGeneratorTests.cs (30)
47using var workspace = CreateWorkspace(testHost: testHost); 79using var workspace = CreateWorkspace(testHost: testHost); 127using var workspace = CreateWorkspace(testHost: testHost); 158using var workspace = CreateWorkspace(testHost: testHost); 252using var workspace = CreateWorkspace(testHost: testHost); 292using var workspace = CreateWorkspace(testHost: testHost); 336using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 364using var workspace = CreateWorkspace(testHost: testHost); 386using var workspace = CreateWorkspace(testHost: testHost); 417using var workspace = CreateWorkspace(testHost: testHost); 442using var workspace = CreateWorkspace(testHost: testHost); 456using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 479using var workspace = CreateWorkspace(testHost: testHost); 499using var workspace = CreateWorkspace(testHost: testHost); 521using var workspace = CreateWorkspace(testHost: testHost); 575using var workspace = CreateWorkspace(testHost: testHost); 587using var workspace = CreateWorkspace(testHost: testHost); 611using var workspace = CreateWorkspace(testHost: testHost); 630using var workspace = CreateWorkspace(testHost: testHost); 658using var workspace = CreateWorkspace(testHost: testHost); 689using var workspace = CreateWorkspace(testHost: testHost); 717using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 747using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 776using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 805using var workspace = CreateWorkspaceWithPartialSemantics(testHost); 838using var workspace = CreateWorkspace(testHost: testHost); 866using var workspace = CreateWorkspace(testHost: testHost); 899using var workspace = CreateWorkspace(testHost: testHost); 924using var workspace = CreateWorkspace(testHost: testHost); 942using var workspace = CreateWorkspace(testHost: testHost);
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
26using var workspace = CreateWorkspace(additionalParts: [typeof(TestSourceGeneratorTelemetryCollectorWorkspaceServiceFactory)]);
SolutionTests\TextLoaderTests.cs (11)
22public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 29public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 33public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 37public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 41public virtual Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 47public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 53public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 59public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 65public override Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 85public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 94public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken)
SyntaxReferenceTests.cs (7)
22private static Workspace CreateWorkspace() 48using var workspace = CreateWorkspace(); 71using var workspace = CreateWorkspace(); 93using var workspace = CreateWorkspace(); 116using var workspace = CreateWorkspace(); 139using var workspace = CreateWorkspace(); 167using var workspace = CreateWorkspace();
TestCompositionTests.cs (2)
26var assembly1 = typeof(Workspace).Assembly; 81var assembly1 = typeof(Workspace).Assembly;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
298private static void TestPublicOption(Workspace workspace, IPublicOption option, string? language, CodeStyleOption<bool> newPublicValue) 314private static void TestInternalOption(Workspace workspace, IOption2 option, string? language, CodeStyleOption2<bool> newValue)
WorkspaceTests\WorkspaceReferenceTests.cs (1)
191PortableExecutableReference.CreateFromFile(typeof(Workspace).Assembly.Location)));
Microsoft.VisualStudio.LanguageServices (127)
CallHierarchy\CallHierarchyDetail.cs (2)
22private readonly Workspace _workspace; 27Workspace workspace)
CallHierarchy\CallHierarchyItem.cs (1)
24private readonly Workspace _workspace;
CallHierarchy\Finders\AbstractCallFinder.cs (2)
56public void StartSearch(Workspace workspace, CallHierarchySearchScope searchScope, ICallHierarchySearchCallback callback) 92private async Task SearchAsync(Workspace workspace, CallHierarchySearchScope scope, ICallHierarchySearchCallback callback, CancellationToken cancellationToken)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
151var workspace = buffer.GetWorkspace();
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
94void IEventListener<object>.StartListening(Workspace workspace, object _)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (2)
38_listener = listenerProvider.GetListener(nameof(Workspace)); 42public void StartListening(Workspace workspace, object serviceOpt)
EditorConfigSettings\DataProvider\CodeStyle\CommonCodeStyleSettingsProvider.cs (1)
18public CommonCodeStyleSettingsProvider(string filePath, OptionUpdater settingsUpdater, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\CodeStyle\CommonCodeStyleSettingsProviderFactory.cs (2)
13private readonly Workspace _workspace; 16public CommonCodeStyleSettingsProviderFactory(Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsProvider.cs (1)
18public CommonWhitespaceSettingsProvider(string fileName, OptionUpdater settingsUpdater, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\Whitespace\CommonWhitespaceSettingsProviderFactory.cs (2)
13private readonly Workspace _workspace; 16public CommonWhitespaceSettingsProviderFactory(Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\SettingsEditorControl.xaml.cs (2)
26private readonly Workspace _workspace; 44Workspace workspace,
EditorConfigSettings\SettingsEditorPane.cs (2)
41private readonly Workspace _workspace; 53Workspace workspace)
ExternalAccess\VSTypeScript\Api\IVsTypeScriptRemoteLanguageServiceWorkspaceAccessor.cs (1)
14Workspace RemoteLanguageServiceWorkspace { get; }
ExternalAccess\VSTypeScript\Api\VSTypeScriptContainedLanguageWrapper.cs (2)
33Workspace workspace, 59Workspace workspace,
FindReferences\StreamingFindUsagesPresenter.cs (3)
51private readonly Workspace _workspace; 91Workspace workspace, 107Workspace workspace,
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (1)
92public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
Implementation\ContainedLanguageRefactorNotifyService.cs (3)
20using Workspace = Microsoft.CodeAnalysis.Workspace; 35public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure) 38public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure)
Implementation\VisualStudioSupportsFeatureService.cs (4)
56if (Workspace.TryGetWorkspace(sourceTextContainer, out var workspace)) 71if (Workspace.TryGetWorkspace(sourceTextContainer, out var workspace)
Implementation\VsRefactorNotifyService.cs (5)
22using Workspace = Microsoft.CodeAnalysis.Workspace; 36public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure) 73public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure) 110Workspace workspace, 129Workspace workspace,
InheritanceMargin\InheritanceGlyphFactory.cs (2)
27private readonly Workspace _workspace; 38Workspace workspace,
InheritanceMargin\InheritanceGlyphFactoryProvider.cs (1)
29private readonly Workspace _workspace;
InheritanceMargin\InheritanceGlyphManager.cs (2)
35private readonly Workspace _workspace; 53Workspace workspace,
InheritanceMargin\InheritanceMarginViewMargin.cs (1)
46Workspace workspace,
InheritanceMargin\InheritanceMarginViewMarginProvider.cs (1)
32private readonly Workspace _workspace;
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (2)
27private readonly Workspace _workspace; 34Workspace workspace,
InheritanceMargin\MarginGlyph\InheritanceMarginGlyph.cs (2)
35private readonly Workspace _workspace; 40Workspace workspace,
InlineRename\InlineRenameUndoManager.cs (2)
28using Workspace = Microsoft.CodeAnalysis.Workspace; 102public void CreateStartRenameUndoTransaction(Workspace workspace, ITextBuffer subjectBuffer, IInlineRenameSession inlineRenameSession)
LanguageClient\VisualStudioLspWorkspaceRegistrationService.cs (1)
20public override void Register(Workspace? workspace)
Library\ObjectBrowser\ObjectListItem.cs (2)
15using Workspace = Microsoft.CodeAnalysis.Workspace; 73public async Task<Compilation> GetCompilationAsync(Workspace workspace, CancellationToken cancellationToken)
Packaging\PackageInstallerServiceFactory.cs (1)
258Workspace workspace,
Preview\FileChange.cs (1)
223var workspace = document.Project.Solution.Workspace;
Progression\GraphNavigatorExtension.cs (3)
20using Workspace = Microsoft.CodeAnalysis.Workspace; 24Workspace workspace, 28private readonly Workspace _workspace = workspace;
Progression\GraphProvider.cs (1)
35private readonly Workspace _workspace;
Progression\GraphQueryManager.cs (3)
19using Workspace = Microsoft.CodeAnalysis.Workspace; 23private readonly Workspace _workspace; 34Workspace workspace,
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
157var registration = Workspace.GetWorkspaceRegistration(textBuffer.AsTextContainer());
ProjectSystem\VisualStudioProjectManagementService.cs (2)
31public string GetDefaultNamespace(Microsoft.CodeAnalysis.Project project, Workspace workspace) 60public IList<string> GetFolders(ProjectId projectId, Workspace workspace)
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
128private bool TryOpeningDocumentsForFilePathCore(Workspace workspace, string moniker, ITextBuffer textBuffer, IVsHierarchy? hierarchy)
Remote\VisualStudioWorkspaceServiceHubConnector.cs (2)
33public void StartListening(Workspace workspace, object serviceOpt) 48public void StopListening(Workspace workspace)
Snippets\AbstractSnippetCommandHandler.cs (7)
27using Workspace = Microsoft.CodeAnalysis.Workspace; 95if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 148if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 181if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 214if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 312if (Workspace.TryGetWorkspace(textContainer, out var workspace) && workspace.Kind == WorkspaceKind.Interactive)
Snippets\SnippetExpansionClient.cs (2)
119public ImmutableArray<ArgumentProvider> GetArgumentProviders(Workspace workspace) 1087var workspace = originalProject.Solution.Workspace;
StackTraceExplorer\StackFrameViewModel.cs (2)
35private readonly Workspace _workspace; 45Workspace workspace,
StackTraceExplorer\StackTraceExplorerViewModel.cs (2)
19private readonly Workspace _workspace; 52public StackTraceExplorerViewModel(IThreadingContext threadingContext, Workspace workspace, ClassificationTypeMap classificationTypeMap, IClassificationFormatMap formatMap)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
40private readonly Workspace _workspace;
TaskList\ProjectExternalErrorReporter.cs (1)
265Workspace workspace,
Utilities\IVsEditorAdaptersFactoryServiceExtensions.cs (1)
22Microsoft.CodeAnalysis.Workspace workspace,
ValueTracking\TreeItemViewModel.cs (2)
30protected Workspace Workspace { get; } 54Workspace workspace,
ValueTracking\ValueTrackingCommandHandler.cs (1)
48private readonly Workspace _workspace;
ValueTracking\ValueTrackingToolWindow.cs (2)
23private Workspace? _workspace; 60public void Initialize(ValueTrackingTreeViewModel viewModel, Workspace workspace, IThreadingContext threadingContext)
Venus\ContainedDocument.cs (2)
83private readonly Workspace _workspace; 105Workspace workspace,
Venus\ContainedLanguage.cs (2)
29protected readonly Workspace Workspace; 70Workspace workspace,
Venus\ContainedLanguageCodeSupport.cs (2)
326if (CodeAnalysis.Workspace.TryGetWorkspace(document.GetTextSynchronously(cancellationToken).Container, out var workspace))
Workspace\GlobalUndoServiceFactory.cs (4)
19using Workspace = Microsoft.CodeAnalysis.Workspace; 59public bool CanUndo(Workspace workspace) 65public IWorkspaceGlobalUndoTransaction OpenGlobalUndoTransaction(Workspace workspace, string description) 77public bool IsGlobalTransactionOpen(Workspace workspace)
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (3)
22using Workspace = Microsoft.CodeAnalysis.Workspace; 31private readonly Workspace _workspace; 42Workspace workspace,
Workspace\SourceGeneratedFileManager.cs (1)
295private Workspace Workspace => _fileManager._visualStudioWorkspace;
Workspace\VisualStudioActiveDocumentTracker.cs (6)
28/// A singleton that tracks the open IVsWindowFrames and can report which documents are visible or active in a given <see cref="Workspace"/>. 85/// Returns the <see cref="DocumentId"/> of the active document in a given <see cref="Workspace"/>. 87public DocumentId? TryGetActiveDocument(Workspace workspace) 115/// Get a read-only collection of the <see cref="DocumentId"/>s of all the visible documents in the given <see cref="Workspace"/>. 117public ImmutableArray<DocumentId> GetVisibleDocuments(Workspace workspace) 236public DocumentId? GetDocumentId(Workspace workspace)
Workspace\VisualStudioAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs (1)
55public override void Apply(Workspace workspace, CancellationToken cancellationToken = default)
Workspace\VisualStudioDocumentNavigationService.cs (9)
52public async Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 69Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 101Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 115Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 157Workspace workspace, 181Workspace workspace, 249Workspace workspace, 291IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, CancellationToken cancellationToken) 300Workspace workspace, Document generatedDocument, MappedSpanResult mappedSpanResult, CancellationToken cancellationToken)
Workspace\VisualStudioDocumentTrackingServiceFactory.cs (2)
22private class VisualStudioDocumentTrackingService(VisualStudioActiveDocumentTracker activeDocumentTracker, Workspace workspace) : IDocumentTrackingService 25private readonly Workspace _workspace = workspace;
Workspace\VisualStudioIHostWorkspaceProvider.cs (1)
17public Workspace Workspace { get; }
Workspace\VisualStudioSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs (2)
20using Workspace = Microsoft.CodeAnalysis.Workspace; 67public override void Apply(Workspace workspace, CancellationToken cancellationToken = default)
Workspace\VisualStudioTextUndoHistoryWorkspaceServiceFactory.cs (2)
20using Workspace = Microsoft.CodeAnalysis.Workspace; 42public bool TryGetTextUndoHistory(Workspace editorWorkspace, ITextBuffer textBuffer, out ITextUndoHistory undoHistory)
Microsoft.VisualStudio.LanguageServices.CSharp (12)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsLanguageServiceFactory.cs (1)
30var workspace = languageServices.WorkspaceServices.Workspace;
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProvider.cs (1)
22public CSharpCodeStyleSettingsProvider(string fileName, OptionUpdater settingsUpdater, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\CodeStyle\CSharpCodeStyleSettingsProviderFactory.cs (2)
15private readonly Workspace _workspace; 18public CSharpCodeStyleSettingsProviderFactory(Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsLanguageServiceFactory.cs (1)
30var workspace = languageServices.WorkspaceServices.Workspace;
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProvider.cs (1)
22public CSharpWhitespaceSettingsProvider(string filePath, OptionUpdater updaterService, Workspace workspace, IGlobalOptionService globalOptions)
EditorConfigSettings\DataProvider\Whitespace\CSharpWhitespaceSettingsProviderFactory.cs (2)
15private readonly Workspace _workspace; 18public CSharpWhitespaceSettingsProviderFactory(Workspace workspace, IGlobalOptionService globalOptions)
ProjectSystemShim\CSharpProjectShim.cs (1)
69this.ProjectSystemProjectOptionsProcessor = new OptionsProcessor(this.ProjectSystemProject, Workspace.Services.SolutionServices);
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
132var project = Workspace.CurrentSolution.GetRequiredProject(ProjectSystemProject.Id);
SemanticSearch\SemanticSearchDocumentNavigationService.cs (2)
25public override Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 28public override Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (5)
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (4)
19public static Workspace CreateWorkspace(params Type[]? additionalParts) 22private static Workspace CreateWorkspaceWithProjectAndDocuments() 26var workspace = CreateWorkspace(); 39var workspace = CreateWorkspaceWithProjectAndDocuments();
EditorConfigSettings\DataProvider\DataProviderTests.cs (1)
25private static Workspace GetWorkspace(string? projectFilePath = null)
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Client\ExternalAccess\VSTypeScript\VSTypeScriptRemoteLanguageServiceWorkspaceAccessor.cs (1)
26CodeAnalysis.Workspace IVsTypeScriptRemoteLanguageServiceWorkspaceAccessor.RemoteLanguageServiceWorkspace => _remoteLanguageServiceWorkspace;
Client\Razor\CSharpLspRazorProjectFactory.cs (1)
35public CodeAnalysis.Workspace Workspace => _remoteLanguageServiceWorkspaceHost.Workspace;
Microsoft.VisualStudio.LanguageServices.UnitTests (10)
DebuggerIntelliSense\TestState.vb (5)
40Dim language = Workspace.CurrentSolution.Projects.First().Language 42Dim spanDocument = Workspace.Documents.First(Function(x) x.SelectedSpans.Any()) 46Dim componentModel = New MockComponentModel(Workspace.ExportProvider) 51Workspace.Projects.First().Documents.Last().GetTextBuffer(), 59Workspace.Projects.First().Documents.Last().GetTextBuffer(),
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
323Public Function GetCachedDiagnosticsAsync(workspace As Workspace, projectId As ProjectId, documentId As DocumentId, includeSuppressedDiagnostics As Boolean, includeLocalDocumentDiagnostics As Boolean, includeNonLocalDocumentDiagnostics As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of DiagnosticData)) Implements IDiagnosticAnalyzerService.GetCachedDiagnosticsAsync
Snippets\SnippetTestState.vb (4)
47Workspace.GlobalOptions.SetGlobalOption(SnippetsOptionsStorage.Snippets, True) 51Dim snippetCommandHandler = Workspace.GetService(Of ICommandHandler)(contentType, name) 55Dim editorOptionsService = Workspace.GetService(Of EditorOptionsService)() 56Dim snippetExpansionClientFactory = Workspace.Services.GetRequiredService(Of ISnippetExpansionClientFactory)()
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.vb (2)
52VisualStudioProjectOptionsProcessor = New OptionsProcessor(ProjectSystemProject, Workspace.Services.SolutionServices) 201Dim project = Workspace.CurrentSolution.GetProject(ProjectSystemProject.Id)
Microsoft.VisualStudio.LanguageServices.Xaml (4)
Features\InlineRename\XamlEditorInlineRenameService.cs (2)
109public bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText) 114public bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, string replacementText)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (1)
176var workspace = solution.Workspace;
Implementation\XamlProjectService.cs (1)
33private readonly Workspace _workspace;
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\WorkspacePanel.xaml.cs (1)
75private static async Task CompareClosedDocumentsWithFileSystemAsync(Workspace workspace, StringBuilder output, CancellationToken cancellationToken)
Roslyn.VisualStudio.Next.UnitTests (12)
Remote\SnapshotSerializationTests.cs (2)
41private static Workspace CreateWorkspace(Type[] additionalParts = null) 44internal static Solution SetFullSolution(Workspace workspace)
Services\AssetProviderTests.cs (6)
29private static Workspace CreateRemoteWorkspace() 51using var remoteWorkspace = CreateRemoteWorkspace(); 81using var remoteWorkspace = CreateRemoteWorkspace(); 109using var remoteWorkspace = CreateRemoteWorkspace(); 134using var remoteWorkspace = CreateRemoteWorkspace(); 163using var remoteWorkspace = CreateRemoteWorkspace();
Services\ServiceHubServicesTests.cs (3)
106private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null) 1470Workspace remoteWorkspace,
Services\SolutionServiceTests.cs (1)
1316private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, RemoteWorkspace remoteWorkspace, Solution solution, Dictionary<Checksum, object>? map = null)