PackageUtilities.IsCapabilityMatch Method

Definition

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

Overloads

IsCapabilityMatch(String, String)

Checks whether a given set of project capabilities fulfills the requirements prescribed in an AppliesTo expression.

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

IsCapabilityMatch(IVsHierarchy, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

Remarks

For more information about project capabilities, see VsProjectCapabilityExpressionMatcher.

IsCapabilityMatch(String, String)

Checks whether a given set of project capabilities fulfills the requirements prescribed in an AppliesTo expression.

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

Parameters

capabilities
String

A space-delimited list of project capabilities, same format as __VSHPROPID5.VSHPROPID_ProjectCapabilities -- null and empty is allowed and results in an empty set of project capabilities during evaluation.

capabilityAppliesToExpression
String

The capability expression, such as "(VisualC | CSharp) + (MSTest | NUnit)". The '|' is the OR operator. The '&' and '+' characters are both AND operators. The '!' character is the NOT operator. Parentheses force evaluation precedence order. A null or empty expression is evaluated as a match.

Returns

true if the project contains a matching set of project capabilities; false otherwise.

Applies to

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

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

Parameters

capabilityPresenceChecker
IVsBooleanSymbolPresenceChecker

The project capability presence checker to use when evaluating the expression.

capabilityAppliesToExpression
String

The capability expression, such as "(VisualC | CSharp) + (MSTest | NUnit)". The '|' is the OR operator. The '&' and '+' characters are both AND operators. The '!' character is the NOT operator. Parentheses force evaluation precedence order. A null or empty expression is evaluated as a match.

Returns

true if the project contains a matching set of project capabilities; false otherwise.

Applies to

IsCapabilityMatch(IVsHierarchy, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

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

Parameters

project
IVsHierarchy

The project to test compatibility.

capabilityAppliesToExpression
String

The capability expression, such as "(VisualC | CSharp) + (MSTest | NUnit)". The '|' is the OR operator. The '&' and '+' characters are both AND operators. The '!' character is the NOT operator. Parentheses force evaluation precedence order. A null or empty expression is evaluated as a match.

Returns

true if the project contains a matching set of project capabilities; false otherwise.

Applies to