Mono.Addins.ConditionType.Evaluate C# (CSharp) Method

Evaluate() public abstract method

Evaluates the condition.
public abstract Evaluate ( NodeElement conditionNode ) : bool
conditionNode NodeElement /// Condition node information. ///
return bool
        public abstract bool Evaluate(NodeElement conditionNode);

Usage Example

Example #1
0
        public override bool Evaluate(ExtensionContext ctx)
        {
            if (!base.Evaluate(ctx))
            {
                return(false);
            }

            ConditionType type = ctx.GetCondition(typeId);

            if (type == null)
            {
                addinEngine.ReportError("Condition '" + typeId + "' not found in current extension context.", null, null, false);
                return(false);
            }

            try
            {
                return(type.Evaluate(node));
            }
            catch (Exception ex)
            {
                addinEngine.ReportError("Error while evaluating condition '" + typeId + "'", null, ex, false);
                return(false);
            }
        }
All Usage Examples Of Mono.Addins.ConditionType::Evaluate