public IEnumerable <T> GetObjects <T>(ObjectId rootId, IConfigDataProvider session, OptionalIdentityData optionalData, out LocalizedString?notFoundReason) where T : IConfigurable, new()
        {
            notFoundReason = null;
            AggregationSubscriptionQueryFilter filter = new AggregationSubscriptionQueryFilter(this);

            return(session.FindPaged <T>(filter, rootId, false, null, 0));
        }
예제 #2
0
        private PimSubscriptionProxy[] GetSubscriptions(AggregationSubscriptionQueryFilter queryFilter)
        {
            List <PimSubscriptionProxy>     list             = new List <PimSubscriptionProxy>(3);
            IList <AggregationSubscription> allSubscriptions = this.GetAllSubscriptions();

            if (allSubscriptions != null)
            {
                foreach (AggregationSubscription aggregationSubscription in allSubscriptions)
                {
                    PimAggregationSubscription pimAggregationSubscription = (PimAggregationSubscription)aggregationSubscription;
                    if (queryFilter == null || queryFilter.Match(pimAggregationSubscription))
                    {
                        PimSubscriptionProxy pimSubscriptionProxy = pimAggregationSubscription.CreateSubscriptionProxy();
                        if (this.loadReport && this.reports.ContainsKey(aggregationSubscription.SubscriptionGuid))
                        {
                            pimSubscriptionProxy.Report = this.reports[aggregationSubscription.SubscriptionGuid];
                        }
                        list.Add(pimSubscriptionProxy);
                    }
                }
            }
            return(list.ToArray());
        }