PackageUtilities.IsCapabilityMatch Method

Definition

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

Overloads

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

Determines 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.

IsCapabilityMatch(String, String)

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

Remarks

For more information about project capabilities, see VsProjectCapabilityExpressionMatcher.

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

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

public static bool IsCapabilityMatch (Microsoft.VisualStudio.Shell.Interop.IVsBooleanSymbolPresenceChecker capabilityPresenceChecker, string capabilityAppliesToExpression);
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.

IsCapabilityMatch(IVsHierarchy, String)

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

public static bool IsCapabilityMatch (this Microsoft.VisualStudio.Shell.Interop.IVsHierarchy project, string capabilityAppliesToExpression);
Parameters
project
IVsHierarchy

The project to test for 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; otherwise, false.

IsCapabilityMatch(String, String)

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

public static bool IsCapabilityMatch (string capabilities, string capabilityAppliesToExpression);
Parameters
capabilities
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
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; otherwise, false.

Applies to