153 references to ApplyChangesKind
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
28if (service.CanApplyChange(ApplyChangesKind.ChangeDocumentInfo))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TypeCharCommand.cs (1)
50if (document != null && document.Project.Solution.Workspace.CanApplyChange(ApplyChangesKind.ChangeDocument))
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
85if (!solution.CanApplyChange(ApplyChangesKind.ChangeDocument) ||
Microsoft.CodeAnalysis.EditorFeatures (12)
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
46workspace.CanApplyChange(ApplyChangesKind.ChangeDocument) &&
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
96workspace.CanApplyChange(ApplyChangesKind.AddDocument) && 97workspace.CanApplyChange(ApplyChangesKind.ChangeDocument) &&
ExtractMethod\ExtractMethodCommandHandler.cs (1)
72!workspace.CanApplyChange(ApplyChangesKind.ChangeDocument) ||
Formatting\FormatCommandHandler.Paste.cs (1)
53!workspace.CanApplyChange(ApplyChangesKind.ChangeDocument))
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
155this.Document.Project.Solution.CanApplyChange(ApplyChangesKind.ChangeDocumentInfo))
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
130workspace.CanApplyChange(ApplyChangesKind.ChangeDocument) &&
Interactive\InteractiveWorkspace.cs (2)
24public override bool CanApplyChange(ApplyChangesKind feature) 25=> feature == ApplyChangesKind.ChangeDocument;
NavigationBar\NavigationBarController_ModelComputation.cs (1)
135workspace.CanApplyChange(ApplyChangesKind.ChangeDocument),
Organizing\OrganizeDocumentCommandHandler.cs (1)
77if (!workspace.CanApplyChange(ApplyChangesKind.ChangeDocument))
Shared\Preview\PreviewWorkspace.cs (1)
34public override bool CanApplyChange(ApplyChangesKind feature)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\MefTestWorkspace.cs (1)
23public override bool CanApplyChange(ApplyChangesKind feature)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.cs (1)
91workspace.CanApplyChange(ApplyChangesKind.ChangeDocument);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
IRazorDocumentOperationService.cs (1)
10/// document version of <see cref="Workspace.CanApplyChange(ApplyChangesKind)"/>
Microsoft.CodeAnalysis.Features (4)
GenerateType\AbstractGenerateTypeService.cs (1)
109if (document.Project.Solution.CanApplyChange(ApplyChangesKind.AddDocument))
SemanticSearch\SemanticSearchWorkspace.cs (2)
26public override bool CanApplyChange(ApplyChangesKind feature) 27=> feature == ApplyChangesKind.ChangeDocument;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
28if (service.CanApplyChange(ApplyChangesKind.ChangeDocumentInfo))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Microsoft.CodeAnalysis.Workspaces (54)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Workspace\AdhocWorkspace.cs (1)
26public override bool CanApplyChange(ApplyChangesKind feature)
Workspace\Host\DocumentService\IDocumentOperationService.cs (1)
14/// document version of <see cref="Workspace.CanApplyChange(ApplyChangesKind)"/>
Workspace\Host\ISupportedChangesService.cs (2)
18bool CanApplyChange(ApplyChangesKind kind); 41public bool CanApplyChange(ApplyChangesKind kind)
Workspace\Workspace.cs (49)
1533public virtual bool CanApplyChange(ApplyChangesKind feature) 1548/// will still throw if the solution contains changes that are not supported according to the <see cref="CanApplyChange(ApplyChangesKind)"/> 1552/// <see cref="CanApplyChange(ApplyChangesKind)"/> method.</exception> 1690if (!CanApplyChange(ApplyChangesKind.RemoveProject) && solutionChanges.GetRemovedProjects().Any()) 1695if (!CanApplyChange(ApplyChangesKind.AddProject) && solutionChanges.GetAddedProjects().Any()) 1700if (!CanApplyChange(ApplyChangesKind.AddSolutionAnalyzerReference) && solutionChanges.GetAddedAnalyzerReferences().Any()) 1705if (!CanApplyChange(ApplyChangesKind.RemoveSolutionAnalyzerReference) && solutionChanges.GetRemovedAnalyzerReferences().Any()) 1721if (!CanApplyChange(ApplyChangesKind.ChangeCompilationOptions) && 1752if (!CanApplyChange(ApplyChangesKind.ChangeParseOptions) && 1759if (!CanApplyChange(ApplyChangesKind.AddDocument) && projectChanges.GetAddedDocuments().Any()) 1764if (!CanApplyChange(ApplyChangesKind.RemoveDocument) && projectChanges.GetRemovedDocuments().Any()) 1769if (!CanApplyChange(ApplyChangesKind.ChangeDocumentInfo) 1777if (!CanApplyChange(ApplyChangesKind.ChangeDocument) && changedDocumentIds.Length > 0) 1794if (!CanApplyChange(ApplyChangesKind.AddAdditionalDocument) && projectChanges.GetAddedAdditionalDocuments().Any()) 1799if (!CanApplyChange(ApplyChangesKind.RemoveAdditionalDocument) && projectChanges.GetRemovedAdditionalDocuments().Any()) 1804if (!CanApplyChange(ApplyChangesKind.ChangeAdditionalDocument) && projectChanges.GetChangedAdditionalDocuments().Any()) 1809if (!CanApplyChange(ApplyChangesKind.AddAnalyzerConfigDocument) && projectChanges.GetAddedAnalyzerConfigDocuments().Any()) 1814if (!CanApplyChange(ApplyChangesKind.RemoveAnalyzerConfigDocument) && projectChanges.GetRemovedAnalyzerConfigDocuments().Any()) 1819if (!CanApplyChange(ApplyChangesKind.ChangeAnalyzerConfigDocument) && projectChanges.GetChangedAnalyzerConfigDocuments().Any()) 1824if (!CanApplyChange(ApplyChangesKind.AddProjectReference) && projectChanges.GetAddedProjectReferences().Any()) 1829if (!CanApplyChange(ApplyChangesKind.RemoveProjectReference) && projectChanges.GetRemovedProjectReferences().Any()) 1834if (!CanApplyChange(ApplyChangesKind.AddMetadataReference) && projectChanges.GetAddedMetadataReferences().Any()) 1839if (!CanApplyChange(ApplyChangesKind.RemoveMetadataReference) && projectChanges.GetRemovedMetadataReferences().Any()) 1844if (!CanApplyChange(ApplyChangesKind.AddAnalyzerReference) && projectChanges.GetAddedAnalyzerReferences().Any()) 1849if (!CanApplyChange(ApplyChangesKind.RemoveAnalyzerReference) && projectChanges.GetRemovedAnalyzerReferences().Any()) 1859/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="ApplyChangesKind.ChangeCompilationOptions"/>. 1872/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="ApplyChangesKind.ChangeParseOptions"/>. 2091Debug.Assert(CanApplyChange(ApplyChangesKind.AddProject)); 2102Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveProject)); 2117Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeCompilationOptions) || 2135Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeParseOptions) || 2148Debug.Assert(CanApplyChange(ApplyChangesKind.AddProjectReference)); 2159Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveProjectReference)); 2170Debug.Assert(CanApplyChange(ApplyChangesKind.AddMetadataReference)); 2181Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveMetadataReference)); 2192Debug.Assert(CanApplyChange(ApplyChangesKind.AddAnalyzerReference)); 2203Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveAnalyzerReference)); 2214Debug.Assert(CanApplyChange(ApplyChangesKind.AddSolutionAnalyzerReference)); 2225Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveSolutionAnalyzerReference)); 2236Debug.Assert(CanApplyChange(ApplyChangesKind.AddDocument)); 2247Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveDocument)); 2258Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeDocument)); 2269Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeDocumentInfo)); 2280Debug.Assert(CanApplyChange(ApplyChangesKind.AddAdditionalDocument)); 2291Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveAdditionalDocument)); 2302Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeAdditionalDocument)); 2313Debug.Assert(CanApplyChange(ApplyChangesKind.AddAnalyzerConfigDocument)); 2324Debug.Assert(CanApplyChange(ApplyChangesKind.RemoveAnalyzerConfigDocument)); 2335Debug.Assert(CanApplyChange(ApplyChangesKind.ChangeAnalyzerConfigDocument));
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\MSBuildWorkspace.cs (11)
271public override bool CanApplyChange(ApplyChangesKind feature) 274ApplyChangesKind.ChangeDocument or 275ApplyChangesKind.AddDocument or 276ApplyChangesKind.RemoveDocument or 277ApplyChangesKind.AddMetadataReference or 278ApplyChangesKind.RemoveMetadataReference or 279ApplyChangesKind.AddProjectReference or 280ApplyChangesKind.RemoveProjectReference or 281ApplyChangesKind.AddAnalyzerReference or 282ApplyChangesKind.RemoveAnalyzerReference or 283ApplyChangesKind.ChangeAdditionalDocument;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2188Assert.False(workspace.CanApplyChange(ApplyChangesKind.AddAdditionalDocument)); 2198Assert.False(workspace.CanApplyChange(ApplyChangesKind.RemoveAdditionalDocument));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (17)
Workspaces\TestWorkspace`1.cs (17)
334public override bool CanApplyChange(ApplyChangesKind feature) 338case ApplyChangesKind.AddDocument: 339case ApplyChangesKind.RemoveDocument: 342case ApplyChangesKind.AddAdditionalDocument: 343case ApplyChangesKind.RemoveAdditionalDocument: 344case ApplyChangesKind.AddAnalyzerConfigDocument: 345case ApplyChangesKind.RemoveAnalyzerConfigDocument: 346case ApplyChangesKind.AddAnalyzerReference: 347case ApplyChangesKind.RemoveAnalyzerReference: 348case ApplyChangesKind.AddSolutionAnalyzerReference: 349case ApplyChangesKind.RemoveSolutionAnalyzerReference: 352case ApplyChangesKind.ChangeDocument: 353case ApplyChangesKind.ChangeAdditionalDocument: 354case ApplyChangesKind.ChangeAnalyzerConfigDocument: 355case ApplyChangesKind.ChangeDocumentInfo: 358case ApplyChangesKind.AddProjectReference: 359case ApplyChangesKind.AddMetadataReference:
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
SolutionTests\TryApplyChangesTests.cs (7)
21private readonly ImmutableArray<ApplyChangesKind> _allowedKinds; 25public CustomizedCanApplyWorkspace(params ApplyChangesKind[] allowedKinds) 30public CustomizedCanApplyWorkspace(ApplyChangesKind[] allowedKinds, 43public override bool CanApplyChange(ApplyChangesKind feature) 75allowedKinds: [ApplyChangesKind.ChangeCompilationOptions], 118allowedKinds: [ApplyChangesKind.ChangeParseOptions], 163using var workspace = new CustomizedCanApplyWorkspace(allowedKinds: ApplyChangesKind.AddAnalyzerConfigDocument);
WorkspaceTests\WorkspaceTests.cs (1)
124public override bool CanApplyChange(ApplyChangesKind feature)
Microsoft.VisualStudio.LanguageServices (26)
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
51var canAddDocument = solution.CanApplyChange(ApplyChangesKind.AddDocument);
ExtractInterface\VisualStudioExtractInterfaceOptionsService.cs (1)
47var canAddDocument = solution.CanApplyChange(ApplyChangesKind.AddDocument);
ProjectSystem\MiscellaneousFilesWorkspace.cs (2)
322public override bool CanApplyChange(ApplyChangesKind feature) 323=> feature == ApplyChangesKind.ChangeDocument;
ProjectSystem\VisualStudioWorkspaceImpl.cs (21)
354public override bool CanApplyChange(ApplyChangesKind feature) 358case ApplyChangesKind.AddDocument: 359case ApplyChangesKind.RemoveDocument: 360case ApplyChangesKind.ChangeDocument: 361case ApplyChangesKind.AddMetadataReference: 362case ApplyChangesKind.RemoveMetadataReference: 363case ApplyChangesKind.AddProjectReference: 364case ApplyChangesKind.RemoveProjectReference: 365case ApplyChangesKind.AddAnalyzerReference: 366case ApplyChangesKind.RemoveAnalyzerReference: 367case ApplyChangesKind.AddAdditionalDocument: 368case ApplyChangesKind.RemoveAdditionalDocument: 369case ApplyChangesKind.ChangeAdditionalDocument: 370case ApplyChangesKind.ChangeCompilationOptions: 371case ApplyChangesKind.ChangeParseOptions: 372case ApplyChangesKind.ChangeDocumentInfo: 373case ApplyChangesKind.AddAnalyzerConfigDocument: 374case ApplyChangesKind.RemoveAnalyzerConfigDocument: 375case ApplyChangesKind.ChangeAnalyzerConfigDocument: 376case ApplyChangesKind.AddSolutionAnalyzerReference: 377case ApplyChangesKind.RemoveSolutionAnalyzerReference:
Snippets\AbstractSnippetCommandHandler.cs (1)
244!workspace.CanApplyChange(ApplyChangesKind.ChangeDocument))
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Snippets\SnippetCommandHandler.cs (1)
72!workspace.CanApplyChange(ApplyChangesKind.ChangeDocument))
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\RemoteLanguageServiceWorkspace.cs (4)
430public override bool CanApplyChange(ApplyChangesKind feature) 434case ApplyChangesKind.ChangeDocument: 435case ApplyChangesKind.AddDocument: 436case ApplyChangesKind.RemoveDocument:
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\Mocks\MockVisualStudioWorkspace.vb (1)
41Public Overrides Function CanApplyChange(feature As ApplyChangesKind) As Boolean
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9public static bool CanApplyChange(this Solution solution, ApplyChangesKind kind)