Freigeben über


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.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function IsCapabilityMatch ( _
    capabilities As String, _
    capabilityAppliesToExpression As String _
) As Boolean
public static bool IsCapabilityMatch(
    string capabilities,
    string capabilityAppliesToExpression
)
public:
static bool IsCapabilityMatch(
    String^ capabilities, 
    String^ capabilityAppliesToExpression
)
static member IsCapabilityMatch : 
        capabilities:string * 
        capabilityAppliesToExpression:string -> bool
public static function IsCapabilityMatch(
    capabilities : String, 
    capabilityAppliesToExpression : String
) : boolean

Parameters

  • capabilities
    Type: String

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

  • capabilityAppliesToExpression
    Type: 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: Boolean
true if the project contains a matching set of project capabilities; otherwise, false.

.NET Framework Security

See Also

Reference

PackageUtilities Class

IsCapabilityMatch Overload

Microsoft.VisualStudio.Shell Namespace