PackageUtilities.IsCapabilityMatch 方法

定義

檢查指定的專案是否符合 AppliesTo 運算式中指定的需求。

多載

IsCapabilityMatch(String, String)

檢查指定的專案功能集是否符合 AppliesTo 運算式中指定的需求。

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

檢查指定的專案是否符合 AppliesTo 運算式中指定的需求。

IsCapabilityMatch(IVsHierarchy, String)

檢查指定的專案是否符合 AppliesTo 運算式中指定的需求。

備註

如需專案功能的詳細資訊,請參閱 VsProjectCapabilityExpressionMatcher

IsCapabilityMatch(String, String)

檢查指定的專案功能集是否符合 AppliesTo 運算式中指定的需求。

public:
 static bool IsCapabilityMatch(System::String ^ capabilities, System::String ^ capabilityAppliesToExpression);
public:
 static bool IsCapabilityMatch(Platform::String ^ capabilities, Platform::String ^ capabilityAppliesToExpression);
 static bool IsCapabilityMatch(std::wstring const & capabilities, std::wstring const & capabilityAppliesToExpression);
public static bool IsCapabilityMatch (string capabilities, string capabilityAppliesToExpression);
static member IsCapabilityMatch : string * string -> bool
Public Function IsCapabilityMatch (capabilities As String, capabilityAppliesToExpression As String) As Boolean

參數

capabilities
String

以空格分隔的專案功能清單,格式與__VSHPROPID5相同。VSHPROPID_ProjectCapabilities -- 允許 null 和空白,並在評估期間產生一組空的專案功能。

capabilityAppliesToExpression
String

功能運算式,例如 "(VisualC | CSharp) + (MSTest | NUnit)"。 '|' 是 OR 運算符。 '&' 和 '+' 字元都是 AND 運算符。 '!' 字元是 NOT 運算符。 括弧會強制評估優先順序。 Null 或空白運算式會判斷值為相符項目。

傳回

true 如果專案包含一組相符的專案功能,則為 ; false 否則。

適用於

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

檢查指定的專案是否符合 AppliesTo 運算式中指定的需求。

public:
 static bool IsCapabilityMatch(Microsoft::VisualStudio::Shell::Interop::IVsBooleanSymbolPresenceChecker ^ capabilityPresenceChecker, System::String ^ capabilityAppliesToExpression);
public:
 static bool IsCapabilityMatch(Microsoft::VisualStudio::Shell::Interop::IVsBooleanSymbolPresenceChecker ^ capabilityPresenceChecker, Platform::String ^ capabilityAppliesToExpression);
 static bool IsCapabilityMatch(Microsoft::VisualStudio::Shell::Interop::IVsBooleanSymbolPresenceChecker const & capabilityPresenceChecker, std::wstring const & capabilityAppliesToExpression);
public static bool IsCapabilityMatch (Microsoft.VisualStudio.Shell.Interop.IVsBooleanSymbolPresenceChecker capabilityPresenceChecker, string capabilityAppliesToExpression);
static member IsCapabilityMatch : Microsoft.VisualStudio.Shell.Interop.IVsBooleanSymbolPresenceChecker * string -> bool
Public Function IsCapabilityMatch (capabilityPresenceChecker As IVsBooleanSymbolPresenceChecker, capabilityAppliesToExpression As String) As Boolean

參數

capabilityPresenceChecker
IVsBooleanSymbolPresenceChecker

評估表達式時要使用的專案功能狀態檢查程式。

capabilityAppliesToExpression
String

功能運算式,例如 "(VisualC | CSharp) + (MSTest | NUnit)"。 '|' 是 OR 運算符。 '&' 和 '+' 字元都是 AND 運算符。 '!' 字元是 NOT 運算符。 括弧會強制評估優先順序。 Null 或空白運算式會判斷值為相符項目。

傳回

true 如果專案包含一組相符的專案功能,則為 ; false 否則。

適用於

IsCapabilityMatch(IVsHierarchy, String)

檢查指定的專案是否符合 AppliesTo 運算式中指定的需求。

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsCapabilityMatch(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ project, System::String ^ capabilityAppliesToExpression);
public:
[System::Runtime::CompilerServices::Extension]
 static bool IsCapabilityMatch(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ project, Platform::String ^ capabilityAppliesToExpression);
public static bool IsCapabilityMatch (this Microsoft.VisualStudio.Shell.Interop.IVsHierarchy project, string capabilityAppliesToExpression);
static member IsCapabilityMatch : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * string -> bool
<Extension()>
Public Function IsCapabilityMatch (project As IVsHierarchy, capabilityAppliesToExpression As String) As Boolean

參數

project
IVsHierarchy

要測試相容性的專案。

capabilityAppliesToExpression
String

功能運算式,例如 "(VisualC | CSharp) + (MSTest | NUnit)"。 '|' 是 OR 運算符。 '&' 和 '+' 字元都是 AND 運算符。 '!' 字元是 NOT 運算符。 括弧會強制評估優先順序。 Null 或空白運算式會判斷值為相符項目。

傳回

true 如果專案包含一組相符的專案功能,則為 ; false 否則。

適用於