153 references to ApplyChangesKind
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
28
if (service.CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TypeCharCommand.cs (1)
50
if (document != null && document.Project.Solution.Workspace.CanApplyChange(
ApplyChangesKind
.ChangeDocument))
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
85
if (!solution.CanApplyChange(
ApplyChangesKind
.ChangeDocument) ||
Microsoft.CodeAnalysis.EditorFeatures (12)
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
46
workspace.CanApplyChange(
ApplyChangesKind
.ChangeDocument) &&
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
96
workspace.CanApplyChange(
ApplyChangesKind
.AddDocument) &&
97
workspace.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)
156
this.Document.Project.Solution.CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo))
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
131
workspace.CanApplyChange(
ApplyChangesKind
.ChangeDocument) &&
Interactive\InteractiveWorkspace.cs (2)
24
public override bool CanApplyChange(
ApplyChangesKind
feature)
25
=> feature ==
ApplyChangesKind
.ChangeDocument;
NavigationBar\NavigationBarController_ModelComputation.cs (1)
135
workspace.CanApplyChange(
ApplyChangesKind
.ChangeDocument),
Organizing\OrganizeDocumentCommandHandler.cs (1)
77
if (!workspace.CanApplyChange(
ApplyChangesKind
.ChangeDocument))
Shared\Preview\PreviewWorkspace.cs (1)
34
public override bool CanApplyChange(
ApplyChangesKind
feature)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\MefTestWorkspace.cs (1)
23
public override bool CanApplyChange(
ApplyChangesKind
feature)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.cs (1)
91
workspace.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)
108
if (document.Project.Solution.CanApplyChange(
ApplyChangesKind
.AddDocument))
SemanticSearch\SemanticSearchWorkspace.cs (2)
19
public override bool CanApplyChange(
ApplyChangesKind
feature)
20
=> feature ==
ApplyChangesKind
.ChangeDocument;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
28
if (service.CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo))
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Microsoft.CodeAnalysis.Workspaces (54)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Workspace\AdhocWorkspace.cs (1)
26
public 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)
18
bool CanApplyChange(
ApplyChangesKind
kind);
41
public bool CanApplyChange(
ApplyChangesKind
kind)
Workspace\Workspace.cs (49)
1533
public 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>
1692
if (!CanApplyChange(
ApplyChangesKind
.RemoveProject) && solutionChanges.GetRemovedProjects().Any())
1697
if (!CanApplyChange(
ApplyChangesKind
.AddProject) && solutionChanges.GetAddedProjects().Any())
1702
if (!CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference) && solutionChanges.GetAddedAnalyzerReferences().Any())
1707
if (!CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference) && solutionChanges.GetRemovedAnalyzerReferences().Any())
1723
if (!CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) &&
1754
if (!CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) &&
1761
if (!CanApplyChange(
ApplyChangesKind
.AddDocument) && projectChanges.GetAddedDocuments().Any())
1766
if (!CanApplyChange(
ApplyChangesKind
.RemoveDocument) && projectChanges.GetRemovedDocuments().Any())
1771
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo)
1779
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocument) && changedDocumentIds.Length > 0)
1796
if (!CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument) && projectChanges.GetAddedAdditionalDocuments().Any())
1801
if (!CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument) && projectChanges.GetRemovedAdditionalDocuments().Any())
1806
if (!CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument) && projectChanges.GetChangedAdditionalDocuments().Any())
1811
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument) && projectChanges.GetAddedAnalyzerConfigDocuments().Any())
1816
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument) && projectChanges.GetRemovedAnalyzerConfigDocuments().Any())
1821
if (!CanApplyChange(
ApplyChangesKind
.ChangeAnalyzerConfigDocument) && projectChanges.GetChangedAnalyzerConfigDocuments().Any())
1826
if (!CanApplyChange(
ApplyChangesKind
.AddProjectReference) && projectChanges.GetAddedProjectReferences().Any())
1831
if (!CanApplyChange(
ApplyChangesKind
.RemoveProjectReference) && projectChanges.GetRemovedProjectReferences().Any())
1836
if (!CanApplyChange(
ApplyChangesKind
.AddMetadataReference) && projectChanges.GetAddedMetadataReferences().Any())
1841
if (!CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference) && projectChanges.GetRemovedMetadataReferences().Any())
1846
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference) && projectChanges.GetAddedAnalyzerReferences().Any())
1851
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference) && projectChanges.GetRemovedAnalyzerReferences().Any())
1861
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeCompilationOptions"/>.
1874
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeParseOptions"/>.
2093
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProject));
2104
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProject));
2119
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) ||
2137
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) ||
2150
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProjectReference));
2161
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProjectReference));
2172
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddMetadataReference));
2183
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference));
2194
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference));
2205
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference));
2216
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference));
2227
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference));
2238
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddDocument));
2249
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveDocument));
2260
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocument));
2271
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo));
2282
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument));
2293
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument));
2304
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument));
2315
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument));
2326
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument));
2337
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeAnalyzerConfigDocument));
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\MSBuildWorkspace.cs (11)
271
public override bool CanApplyChange(
ApplyChangesKind
feature)
274
ApplyChangesKind
.ChangeDocument or
275
ApplyChangesKind
.AddDocument or
276
ApplyChangesKind
.RemoveDocument or
277
ApplyChangesKind
.AddMetadataReference or
278
ApplyChangesKind
.RemoveMetadataReference or
279
ApplyChangesKind
.AddProjectReference or
280
ApplyChangesKind
.RemoveProjectReference or
281
ApplyChangesKind
.AddAnalyzerReference or
282
ApplyChangesKind
.RemoveAnalyzerReference or
283
ApplyChangesKind
.ChangeAdditionalDocument;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2186
Assert.False(workspace.CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument));
2196
Assert.False(workspace.CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (17)
Workspaces\TestWorkspace`1.cs (17)
330
public override bool CanApplyChange(
ApplyChangesKind
feature)
334
case
ApplyChangesKind
.AddDocument:
335
case
ApplyChangesKind
.RemoveDocument:
338
case
ApplyChangesKind
.AddAdditionalDocument:
339
case
ApplyChangesKind
.RemoveAdditionalDocument:
340
case
ApplyChangesKind
.AddAnalyzerConfigDocument:
341
case
ApplyChangesKind
.RemoveAnalyzerConfigDocument:
342
case
ApplyChangesKind
.AddAnalyzerReference:
343
case
ApplyChangesKind
.RemoveAnalyzerReference:
344
case
ApplyChangesKind
.AddSolutionAnalyzerReference:
345
case
ApplyChangesKind
.RemoveSolutionAnalyzerReference:
348
case
ApplyChangesKind
.ChangeDocument:
349
case
ApplyChangesKind
.ChangeAdditionalDocument:
350
case
ApplyChangesKind
.ChangeAnalyzerConfigDocument:
351
case
ApplyChangesKind
.ChangeDocumentInfo:
354
case
ApplyChangesKind
.AddProjectReference:
355
case
ApplyChangesKind
.AddMetadataReference:
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
SolutionTests\TryApplyChangesTests.cs (7)
21
private readonly ImmutableArray<
ApplyChangesKind
> _allowedKinds;
25
public CustomizedCanApplyWorkspace(params
ApplyChangesKind
[] allowedKinds)
30
public CustomizedCanApplyWorkspace(
ApplyChangesKind
[] allowedKinds,
43
public override bool CanApplyChange(
ApplyChangesKind
feature)
75
allowedKinds: [
ApplyChangesKind
.ChangeCompilationOptions],
118
allowedKinds: [
ApplyChangesKind
.ChangeParseOptions],
163
using var workspace = new CustomizedCanApplyWorkspace(allowedKinds:
ApplyChangesKind
.AddAnalyzerConfigDocument);
WorkspaceTests\WorkspaceTests.cs (1)
124
public override bool CanApplyChange(
ApplyChangesKind
feature)
Microsoft.VisualStudio.LanguageServices (26)
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
51
var canAddDocument = solution.CanApplyChange(
ApplyChangesKind
.AddDocument);
ExtractInterface\VisualStudioExtractInterfaceOptionsService.cs (1)
47
var canAddDocument = solution.CanApplyChange(
ApplyChangesKind
.AddDocument);
ProjectSystem\MiscellaneousFilesWorkspace.cs (2)
322
public override bool CanApplyChange(
ApplyChangesKind
feature)
323
=> feature ==
ApplyChangesKind
.ChangeDocument;
ProjectSystem\VisualStudioWorkspaceImpl.cs (21)
415
public override bool CanApplyChange(
ApplyChangesKind
feature)
419
case
ApplyChangesKind
.AddDocument:
420
case
ApplyChangesKind
.RemoveDocument:
421
case
ApplyChangesKind
.ChangeDocument:
422
case
ApplyChangesKind
.AddMetadataReference:
423
case
ApplyChangesKind
.RemoveMetadataReference:
424
case
ApplyChangesKind
.AddProjectReference:
425
case
ApplyChangesKind
.RemoveProjectReference:
426
case
ApplyChangesKind
.AddAnalyzerReference:
427
case
ApplyChangesKind
.RemoveAnalyzerReference:
428
case
ApplyChangesKind
.AddAdditionalDocument:
429
case
ApplyChangesKind
.RemoveAdditionalDocument:
430
case
ApplyChangesKind
.ChangeAdditionalDocument:
431
case
ApplyChangesKind
.ChangeCompilationOptions:
432
case
ApplyChangesKind
.ChangeParseOptions:
433
case
ApplyChangesKind
.ChangeDocumentInfo:
434
case
ApplyChangesKind
.AddAnalyzerConfigDocument:
435
case
ApplyChangesKind
.RemoveAnalyzerConfigDocument:
436
case
ApplyChangesKind
.ChangeAnalyzerConfigDocument:
437
case
ApplyChangesKind
.AddSolutionAnalyzerReference:
438
case
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)
430
public override bool CanApplyChange(
ApplyChangesKind
feature)
434
case
ApplyChangesKind
.ChangeDocument:
435
case
ApplyChangesKind
.AddDocument:
436
case
ApplyChangesKind
.RemoveDocument:
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\Mocks\MockVisualStudioWorkspace.vb (1)
41
Public Overrides Function CanApplyChange(feature As
ApplyChangesKind
) As Boolean
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Host\SupportedChangesServiceExtensions.cs (1)
9
public static bool CanApplyChange(this Solution solution,
ApplyChangesKind
kind)