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)
80
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)
1513
public virtual bool CanApplyChange(
ApplyChangesKind
feature)
1528
/// will still throw if the solution contains changes that are not supported according to the <see cref="CanApplyChange(
ApplyChangesKind
)"/>
1532
/// <see cref="CanApplyChange(
ApplyChangesKind
)"/> method.</exception>
1670
if (!CanApplyChange(
ApplyChangesKind
.RemoveProject) && solutionChanges.GetRemovedProjects().Any())
1675
if (!CanApplyChange(
ApplyChangesKind
.AddProject) && solutionChanges.GetAddedProjects().Any())
1680
if (!CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference) && solutionChanges.GetAddedAnalyzerReferences().Any())
1685
if (!CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference) && solutionChanges.GetRemovedAnalyzerReferences().Any())
1701
if (!CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) &&
1732
if (!CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) &&
1739
if (!CanApplyChange(
ApplyChangesKind
.AddDocument) && projectChanges.GetAddedDocuments().Any())
1744
if (!CanApplyChange(
ApplyChangesKind
.RemoveDocument) && projectChanges.GetRemovedDocuments().Any())
1749
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo)
1757
if (!CanApplyChange(
ApplyChangesKind
.ChangeDocument) && changedDocumentIds.Length > 0)
1774
if (!CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument) && projectChanges.GetAddedAdditionalDocuments().Any())
1779
if (!CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument) && projectChanges.GetRemovedAdditionalDocuments().Any())
1784
if (!CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument) && projectChanges.GetChangedAdditionalDocuments().Any())
1789
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument) && projectChanges.GetAddedAnalyzerConfigDocuments().Any())
1794
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument) && projectChanges.GetRemovedAnalyzerConfigDocuments().Any())
1799
if (!CanApplyChange(
ApplyChangesKind
.ChangeAnalyzerConfigDocument) && projectChanges.GetChangedAnalyzerConfigDocuments().Any())
1804
if (!CanApplyChange(
ApplyChangesKind
.AddProjectReference) && projectChanges.GetAddedProjectReferences().Any())
1809
if (!CanApplyChange(
ApplyChangesKind
.RemoveProjectReference) && projectChanges.GetRemovedProjectReferences().Any())
1814
if (!CanApplyChange(
ApplyChangesKind
.AddMetadataReference) && projectChanges.GetAddedMetadataReferences().Any())
1819
if (!CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference) && projectChanges.GetRemovedMetadataReferences().Any())
1824
if (!CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference) && projectChanges.GetAddedAnalyzerReferences().Any())
1829
if (!CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference) && projectChanges.GetRemovedAnalyzerReferences().Any())
1839
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeCompilationOptions"/>.
1852
/// This method is only called if <see cref="CanApplyChange" /> returns false for <see cref="
ApplyChangesKind
.ChangeParseOptions"/>.
2071
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProject));
2082
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProject));
2097
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeCompilationOptions) ||
2115
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeParseOptions) ||
2128
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddProjectReference));
2139
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveProjectReference));
2150
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddMetadataReference));
2161
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveMetadataReference));
2172
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerReference));
2183
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerReference));
2194
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddSolutionAnalyzerReference));
2205
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveSolutionAnalyzerReference));
2216
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddDocument));
2227
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveDocument));
2238
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocument));
2249
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeDocumentInfo));
2260
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAdditionalDocument));
2271
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAdditionalDocument));
2282
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeAdditionalDocument));
2293
Debug.Assert(CanApplyChange(
ApplyChangesKind
.AddAnalyzerConfigDocument));
2304
Debug.Assert(CanApplyChange(
ApplyChangesKind
.RemoveAnalyzerConfigDocument));
2315
Debug.Assert(CanApplyChange(
ApplyChangesKind
.ChangeAnalyzerConfigDocument));
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\MSBuildWorkspace.cs (11)
269
public override bool CanApplyChange(
ApplyChangesKind
feature)
272
ApplyChangesKind
.ChangeDocument or
273
ApplyChangesKind
.AddDocument or
274
ApplyChangesKind
.RemoveDocument or
275
ApplyChangesKind
.AddMetadataReference or
276
ApplyChangesKind
.RemoveMetadataReference or
277
ApplyChangesKind
.AddProjectReference or
278
ApplyChangesKind
.RemoveProjectReference or
279
ApplyChangesKind
.AddAnalyzerReference or
280
ApplyChangesKind
.RemoveAnalyzerReference or
281
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)
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)