Opc.Ua.ContentFilter.Evaluate C# (CSharp) Method

Evaluate() public method

Evaluates the first element in the ContentFilter. If the first or any subsequent element has dependent elements, the dependent elements are evaluated before the root element (recursive descent). Elements which are not linked (directly or indirectly) to the first element will not be evaluated (they have no influence on the result).
public Evaluate ( FilterContext context, IFilterTarget target ) : bool
context FilterContext The context to use when evaluating the filter.
target IFilterTarget The target to use when evaluating elements that reference the type model.
return bool
        public bool Evaluate(FilterContext context, IFilterTarget target)
        {
            // check if nothing to do.
            if (this.Elements.Count == 0)
            {
                return true;
            }

            bool? result = Evaluate(context, target, 0) as bool?;

            if (result == null)
            {
                return false;
            }

            return result.Value;
        }
        #endregion

Same methods

ContentFilter::Evaluate ( FilterContext context, IFilterTarget target, int index ) : object