PackageUtilities::IsCapabilityMatch Method (String^, String^)

 

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

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
static bool IsCapabilityMatch(
	String^ capabilities,
	String^ capabilityAppliesToExpression
)

Parameters

capabilities
Type: System::String^

A space-delimited list of project capabilities, same format as __VSHPROPID5.VSHPROPID_ProjectCapabilities. This parameter can be null or empty and results in an empty set of project capabilities during evaluation.

capabilityAppliesToExpression
Type: System::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.

Return Value

Type: System::Boolean

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

Return to top
Show: