152 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)
155
this.Document.Project.Solution.CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo))
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
129
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)
60
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)
109
if (document.Project.Solution.CanApplyChange(
ApplyChangesKind
.AddDocument))
SemanticSearch\SemanticSearchWorkspace.cs (2)
26
public override bool CanApplyChange(
ApplyChangesKind
feature)
27
=> 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)
1545
public virtual bool CanApplyChange(
ApplyChangesKind
feature)
1560
/// will still throw if the solution contains changes that are not supported according to the <see cref="CanApplyChange(
ApplyChangesKind
)"/>
1564
/// <see cref="CanApplyChange(
ApplyChangesKind
)"/> method.</exception>
1702
if (!CanApplyChange(
ApplyChangesKind
.RemoveProject) && solutionChanges.GetRemovedProjects().Any())
1707
if (!CanApplyChange(
ApplyChangesKind
.AddProject) && solutionChanges.GetAddedProjects().Any())
1712
if (!CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference) && solutionChanges.GetAddedAnalyzerReferences().Any())
1717
if (!CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference) && solutionChanges.GetRemovedAnalyzerReferences().Any())
1733
if (!CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) &&
1764
if (!CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) &&
1771
if (!CanApplyChange(
ApplyChangesKind
.AddDocument) && projectChanges.GetAddedDocuments().Any())
1776
if (!CanApplyChange(
ApplyChangesKind
.RemoveDocument) && projectChanges.GetRemovedDocuments().Any())
1781
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo)
1789
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocument) && changedDocumentIds.Length > 0)
1806
if (!CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument) && projectChanges.GetAddedAdditionalDocuments().Any())
1811
if (!CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument) && projectChanges.GetRemovedAdditionalDocuments().Any())
1816
if (!CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument) && projectChanges.GetChangedAdditionalDocuments().Any())
1821
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument) && projectChanges.GetAddedAnalyzerConfigDocuments().Any())
1826
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument) && projectChanges.GetRemovedAnalyzerConfigDocuments().Any())
1831
if (!CanApplyChange(
ApplyChangesKind
.ChangeAnalyzerConfigDocument) && projectChanges.GetChangedAnalyzerConfigDocuments().Any())
1836
if (!CanApplyChange(
ApplyChangesKind
.AddProjectReference) && projectChanges.GetAddedProjectReferences().Any())
1841
if (!CanApplyChange(
ApplyChangesKind
.RemoveProjectReference) && projectChanges.GetRemovedProjectReferences().Any())
1846
if (!CanApplyChange(
ApplyChangesKind
.AddMetadataReference) && projectChanges.GetAddedMetadataReferences().Any())
1851
if (!CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference) && projectChanges.GetRemovedMetadataReferences().Any())
1856
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference) && projectChanges.GetAddedAnalyzerReferences().Any())
1861
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference) && projectChanges.GetRemovedAnalyzerReferences().Any())
1871
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeCompilationOptions"/>.
1884
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeParseOptions"/>.
2103
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProject));
2114
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProject));
2129
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) ||
2147
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) ||
2160
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProjectReference));
2171
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProjectReference));
2182
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddMetadataReference));
2193
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference));
2204
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference));
2215
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference));
2226
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference));
2237
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference));
2248
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddDocument));
2259
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveDocument));
2270
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocument));
2281
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo));
2292
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument));
2303
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument));
2314
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument));
2325
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument));
2336
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument));
2347
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)
2188
Assert.False(workspace.CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument));
2198
Assert.False(workspace.CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (17)
Workspaces\TestWorkspace`1.cs (17)
334
public override bool CanApplyChange(
ApplyChangesKind
feature)
338
case
ApplyChangesKind
.AddDocument:
339
case
ApplyChangesKind
.RemoveDocument:
342
case
ApplyChangesKind
.AddAdditionalDocument:
343
case
ApplyChangesKind
.RemoveAdditionalDocument:
344
case
ApplyChangesKind
.AddAnalyzerConfigDocument:
345
case
ApplyChangesKind
.RemoveAnalyzerConfigDocument:
346
case
ApplyChangesKind
.AddAnalyzerReference:
347
case
ApplyChangesKind
.RemoveAnalyzerReference:
348
case
ApplyChangesKind
.AddSolutionAnalyzerReference:
349
case
ApplyChangesKind
.RemoveSolutionAnalyzerReference:
352
case
ApplyChangesKind
.ChangeDocument:
353
case
ApplyChangesKind
.ChangeAdditionalDocument:
354
case
ApplyChangesKind
.ChangeAnalyzerConfigDocument:
355
case
ApplyChangesKind
.ChangeDocumentInfo:
358
case
ApplyChangesKind
.AddProjectReference:
359
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)
354
public override bool CanApplyChange(
ApplyChangesKind
feature)
358
case
ApplyChangesKind
.AddDocument:
359
case
ApplyChangesKind
.RemoveDocument:
360
case
ApplyChangesKind
.ChangeDocument:
361
case
ApplyChangesKind
.AddMetadataReference:
362
case
ApplyChangesKind
.RemoveMetadataReference:
363
case
ApplyChangesKind
.AddProjectReference:
364
case
ApplyChangesKind
.RemoveProjectReference:
365
case
ApplyChangesKind
.AddAnalyzerReference:
366
case
ApplyChangesKind
.RemoveAnalyzerReference:
367
case
ApplyChangesKind
.AddAdditionalDocument:
368
case
ApplyChangesKind
.RemoveAdditionalDocument:
369
case
ApplyChangesKind
.ChangeAdditionalDocument:
370
case
ApplyChangesKind
.ChangeCompilationOptions:
371
case
ApplyChangesKind
.ChangeParseOptions:
372
case
ApplyChangesKind
.ChangeDocumentInfo:
373
case
ApplyChangesKind
.AddAnalyzerConfigDocument:
374
case
ApplyChangesKind
.RemoveAnalyzerConfigDocument:
375
case
ApplyChangesKind
.ChangeAnalyzerConfigDocument:
376
case
ApplyChangesKind
.AddSolutionAnalyzerReference:
377
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:
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)