Exemplo n.º 1
0
        private bool EnumDataFieldFilters(IAimpDataFilterGroup filter, Func <IAimpDataFieldFilter, bool> aProc)
        {
            var result = false;

            if (filter != null)
            {
                for (var i = 0; i < filter.GetChildCount(); i++)
                {
                    IAimpDataFilterGroup group;
                    IAimpDataFieldFilter field;
                    if (filter.GetChild(i, out group) == AimpActionResult.Ok && group != null)
                    {
                        result = EnumDataFieldFilters(group, aProc);
                    }
                    else if (filter.GetChild(i, out field) == AimpActionResult.Ok && field != null)
                    {
                        result = aProc(field);
                    }

                    if (result)
                    {
                        break;
                    }
                }
            }

            return(result);
        }
Exemplo n.º 2
0
        private bool EnumDataFieldFilters(IAimpDataFilterGroup filter, Func <IAimpDataFieldFilter, bool> aProc)
        {
            var result = false;

            if (filter != null)
            {
                for (var i = 0; i < filter.GetChildCount(); i++)
                {
                    var getGroup = filter.GetFilterGroup(i);
                    var getField = filter.GetFieldFilter(i);

                    if (getGroup.ResultType == ActionResultType.OK && getGroup.Result != null)
                    {
                        result = EnumDataFieldFilters(getGroup.Result, aProc);
                    }
                    else if (getField.ResultType == ActionResultType.OK && getField.Result != null)
                    {
                        result = aProc(getField.Result);
                    }

                    if (result)
                    {
                        break;
                    }
                }
            }

            return(result);
        }