共用方式為


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 中包含的專案。

傳回

備註

只有在 針對 ChangeParseOptions 傳回 false 時 CanApplyChange(ApplyChangesKind) ,才會呼叫這個方法。 如果 CanApplyChange(ApplyChangesKind) 傳回 true,則表示允許所有變更,而且不需要呼叫這個方法。

適用於