IVsBooleanSymbolExpressionEvaluator::EvaluateExpression Method (String^, String^)

 

Tests whether a set of symbols causes the expression to evaluate to true.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

bool EvaluateExpression(
	String^ wszExpression,
	String^ wszSymbols
)

Parameters

wszExpression
Type: System::String^

[in, unique] The expression to evaluate, for example, P1 & P2 & (!P3 | P4). Null and empty are allowed and results in a true return value.

wszSymbols
Type: System::String^

[in, unique] Space-delimited list of symbols that evaluate to true, using the same format as VSHPROPID_ProjectCapabilities. Null and empty are allowed and results in an empty set of project capabilities during evaluation.

Return Value

Type: System::Boolean

The result of the evaluation. true if the evaluation succeeded.

Valid expression syntax is defined as:

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

  • Project capabilities may be any character except these reserved characters: "'`:;,+-*/\!~|&%$@^()={}[]<>? \t\b\n\r

Return to top
Show: