Пример #1
0
        public void RegisterSortFilterExpressionScope(IReference <IScope> containerRef, IReference <RuntimeDataRegionObj> scopeRef, bool[] isSortFilterExpressionScope)
        {
            List <IReference <RuntimeSortFilterEventInfo> > runtimeSortFilterInfo = this.m_runtimeSortFilterInfo;

            if (runtimeSortFilterInfo != null && isSortFilterExpressionScope != null && scopeRef != null)
            {
                List <object>[] array = null;
                using (scopeRef.PinValue())
                {
                    RuntimeDataRegionObj runtimeDataRegionObj = scopeRef.Value();
                    using (containerRef.PinValue())
                    {
                        IScope scope = containerRef.Value();
                        for (int i = 0; i < runtimeSortFilterInfo.Count; i++)
                        {
                            if (isSortFilterExpressionScope[i] && runtimeDataRegionObj.IsTargetForSort(i, false) && runtimeDataRegionObj.TargetScopeMatched(i, false))
                            {
                                IReference <RuntimeSortFilterEventInfo> reference = runtimeSortFilterInfo[i];
                                using (reference.PinValue())
                                {
                                    RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value();
                                    if (array == null && runtimeSortFilterEventInfo.EventSource.UserSort.GroupsInSortTarget != null)
                                    {
                                        int num = 0;
                                        array = new List <object> [runtimeSortFilterEventInfo.EventSource.UserSort.GroupsInSortTarget.Count];
                                        runtimeDataRegionObj.GetScopeValues(runtimeSortFilterEventInfo.EventTarget, array, ref num);
                                    }
                                    runtimeSortFilterEventInfo.RegisterSortFilterExpressionScope(ref scope.SortFilterExpressionScopeInfoIndices[i], scopeRef, array, i);
                                }
                            }
                        }
                    }
                }
            }
        }
        internal void RegisterSortFilterExpressionScope(IReference <IScope> containerRef, IReference <RuntimeDataRegionObj> scopeRef, bool[] isSortFilterExpressionScope)
        {
            List <IReference <RuntimeSortFilterEventInfo> > runtimeSortFilterInfo = m_runtimeSortFilterInfo;

            if (runtimeSortFilterInfo == null || isSortFilterExpressionScope == null || scopeRef == null)
            {
                return;
            }
            List <object>[] array = null;
            using (scopeRef.PinValue())
            {
                RuntimeDataRegionObj runtimeDataRegionObj = scopeRef.Value();
                using (containerRef.PinValue())
                {
                    IScope scope = containerRef.Value();
                    for (int i = 0; i < runtimeSortFilterInfo.Count; i++)
                    {
                        if (!isSortFilterExpressionScope[i] || !runtimeDataRegionObj.IsTargetForSort(i, detailSort: false) || !runtimeDataRegionObj.TargetScopeMatched(i, detailSort: false))
                        {
                            continue;
                        }
                        IReference <RuntimeSortFilterEventInfo> reference = runtimeSortFilterInfo[i];
                        using (reference.PinValue())
                        {
                            RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value();
                            if (array == null && runtimeSortFilterEventInfo.EventSource.UserSort.GroupsInSortTarget != null)
                            {
                                int index = 0;
                                array = new List <object> [runtimeSortFilterEventInfo.EventSource.UserSort.GroupsInSortTarget.Count];
                                runtimeDataRegionObj.GetScopeValues(runtimeSortFilterEventInfo.EventTarget, array, ref index);
                            }
                            runtimeSortFilterEventInfo.RegisterSortFilterExpressionScope(ref scope.SortFilterExpressionScopeInfoIndices[i], scopeRef, array, i);
                        }
                    }
                }
            }
        }