Workspace.CanApplyParseOptionChange 方法

定义

调用期间调用以确定 TryApplyChanges(Solution) 是否允许特定更改 ParseOptions

protected:
 virtual bool CanApplyParseOptionChange(Microsoft::CodeAnalysis::ParseOptions ^ oldOptions, Microsoft::CodeAnalysis::ParseOptions ^ newOptions, Microsoft::CodeAnalysis::Project ^ project);
protected virtual bool CanApplyParseOptionChange (Microsoft.CodeAnalysis.ParseOptions oldOptions, Microsoft.CodeAnalysis.ParseOptions newOptions, Microsoft.CodeAnalysis.Project project);
public virtual bool CanApplyParseOptionChange (Microsoft.CodeAnalysis.ParseOptions oldOptions, Microsoft.CodeAnalysis.ParseOptions newOptions, Microsoft.CodeAnalysis.Project project);
abstract member CanApplyParseOptionChange : Microsoft.CodeAnalysis.ParseOptions * Microsoft.CodeAnalysis.ParseOptions * Microsoft.CodeAnalysis.Project -> bool
override this.CanApplyParseOptionChange : Microsoft.CodeAnalysis.ParseOptions * Microsoft.CodeAnalysis.ParseOptions * Microsoft.CodeAnalysis.Project -> bool
Protected Overridable Function CanApplyParseOptionChange (oldOptions As ParseOptions, newOptions As ParseOptions, project As Project) As Boolean
Public Overridable Function CanApplyParseOptionChange (oldOptions As ParseOptions, newOptions As ParseOptions, project As Project) As Boolean

参数

oldOptions
ParseOptions

更改之前项目的旧 ParseOptions 版本。

newOptions
ParseOptions

传递给TryApplyChanges(Solution)的项目的新ParseOptions项。

project
Project

传递给TryApplyChanges(Solution)的项目Solution中包含的项目。

返回

注解

仅当 CanApplyChange(ApplyChangesKind) 返回 false 时 ChangeParseOptions,才调用此方法。 如果 CanApplyChange(ApplyChangesKind) 返回 true,则表示允许所有更改,并且不需要调用此方法。

适用于