Ejemplo n.º 1
0
            public override void TrimInstanceSet(int maxSize, FilterInfo owner)
            {
                int count = base.Count;
                int num   = count;

                if (count > maxSize)
                {
                    if (0 < maxSize)
                    {
                        for (num = maxSize; num < count && base.m_comparer.Compare(base.m_keys[num - 1], base.m_keys[num]) == 0; num++)
                        {
                        }
                        for (int i = num; i < count; i++)
                        {
                            owner.Remove((DataInstanceInfo)base.m_values[i]);
                        }
                        base.m_keys.RemoveRange(num, count - num);
                        base.m_values.RemoveRange(num, count - num);
                    }
                    else
                    {
                        owner.RemoveAll();
                        base.m_keys   = null;
                        base.m_values = null;
                    }
                }
            }
Ejemplo n.º 2
0
            internal override void TrimInstanceSet(int maxSize, FilterInfo owner)
            {
                int count = base.Count;
                int num   = count;

                if (count <= maxSize)
                {
                    return;
                }
                if (0 < maxSize)
                {
                    for (num = maxSize; num < count && m_comparer.Compare(m_keys[num - 1], m_keys[num]) == 0; num++)
                    {
                    }
                    for (int i = num; i < count; i++)
                    {
                        owner.Remove((DataInstanceInfo)m_values[i]);
                    }
                    m_keys.RemoveRange(num, count - num);
                    m_values.RemoveRange(num, count - num);
                }
                else
                {
                    owner.RemoveAll();
                    m_keys   = null;
                    m_values = null;
                }
            }
Ejemplo n.º 3
0
        private void FinishFilters(AggregateUpdateContext context)
        {
            if (m_filterInfo == null)
            {
                return;
            }
            FilterInfo filterInfo = m_filterInfo;

            m_filterInfo       = null;
            m_startFilterIndex = m_currentSpecialFilterIndex + 1;
            bool flag = m_startFilterIndex >= m_filters.Count;

            TrimInstanceSet(filterInfo);
            IEnumerator <object> instances = filterInfo.Instances;

            if (instances != null)
            {
                try
                {
                    Microsoft.ReportingServices.ReportProcessing.ReportProcessing.IFilterOwner filterOwner;
                    if (m_owner != null)
                    {
                        m_owner.PinValue();
                        filterOwner = m_owner.Value();
                    }
                    else
                    {
                        filterOwner = m_ownerObj;
                    }
                    while (instances.MoveNext())
                    {
                        object current = instances.Current;
                        if (FilterTypes.GroupFilter == m_filterType)
                        {
                            IReference <RuntimeGroupLeafObj> reference = (IReference <RuntimeGroupLeafObj>)current;
                            using (reference.PinValue())
                            {
                                RuntimeGroupLeafObj runtimeGroupLeafObj = reference.Value();
                                runtimeGroupLeafObj.SetupEnvironment();
                                if (flag || PassFilters(current))
                                {
                                    runtimeGroupLeafObj.PostFilterNextRow(context);
                                }
                                else
                                {
                                    runtimeGroupLeafObj.FailFilter();
                                }
                            }
                        }
                        else
                        {
                            ((DataFieldRow)current).SetFields(m_processingContext.ReportObjectModel.FieldsImpl);
                            if (flag || PassFilters(current))
                            {
                                filterOwner.PostFilterNextRow();
                            }
                        }
                    }
                }
                finally
                {
                    if (m_owner != null)
                    {
                        m_owner.UnPinValue();
                    }
                }
            }
            filterInfo.RemoveAll();
            filterInfo = null;
            FinishFilters(context);
        }