예제 #1
0
 public IPagedReader <AggOutboundIpHistory> FindPagedOutboundTenantHistory(int lastNMinutes, int perTenantMinimumEmailThreshold, int pageSize = 1000)
 {
     return(this.GetPagedReader <AggOutboundIpHistory>(QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.LastNMinutesQueryProperty, lastNMinutes),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.MinimumEmailThresholdQueryProperty, perTenantMinimumEmailThreshold),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.PageSizeQueryProperty, pageSize)
     }), pageSize));
 }
예제 #2
0
 public IPagedReader <AggInboundSpamDataHistory> GetPagedInboundHistoricalIPData(int lastNMinutes, IPAddress startingIpAddress, IPAddress endIpAddress, int pageSize = 1000)
 {
     return(this.GetPagedReader <AggInboundSpamDataHistory>(QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.LastNMinutesQueryProperty, lastNMinutes),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.StartingIPAddressQueryProperty, startingIpAddress),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.EndIPAddressQueryProperty, endIpAddress),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.PageSizeQueryProperty, pageSize)
     }), pageSize));
 }
예제 #3
0
 public IPagedReader <AggInboundSpamDataHistory> FindPagedInboundSpamIPData(int lastNMinutes, double spamPercentageThreshold, int spamCountThreshold, int pageSize = 1000)
 {
     return(this.GetPagedReader <AggInboundSpamDataHistory>(QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.LastNMinutesQueryProperty, lastNMinutes),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.MinimumSpamPercentageQueryProperty, spamPercentageThreshold),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.MinimumSpamCountQueryProperty, spamCountThreshold),
         ReportingSession.NewPropertyFilter(AggInboundIPSchema.PageSizeQueryProperty, pageSize)
     }), pageSize));
 }
예제 #4
0
 public IPagedReader <AggOutboundEmailAddressIpHistory> FindPagedOutboundHistoricalStatsEmailAddress(int lastNMinutes, Guid tenantId, string emailAddress, int pageSize = 1000)
 {
     return(new ConfigDataProviderPagedReader <AggOutboundEmailAddressIpHistory>(this.DataProvider, null, QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.LastNMinutesQueryProperty, lastNMinutes),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.TenantIdProperty, tenantId),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.FromEmailAddressProperty, emailAddress),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.PageSizeQueryProperty, pageSize)
     }), null, pageSize));
 }
예제 #5
0
 public IPagedReader <AggOutboundEmailAddressIpHistory> FindPagedOutboundStatsGroupByIPEmailAddress(int lastNMinutes, int perTenantPerAddressMinimumEmailThreshold, int pageSize = 1000, bool summaryOnly = true)
 {
     return(this.GetPagedReader <AggOutboundEmailAddressIpHistory>(QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.LastNMinutesQueryProperty, lastNMinutes),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.MinimumEmailThresholdQueryProperty, perTenantPerAddressMinimumEmailThreshold),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.PageSizeQueryProperty, pageSize),
         ReportingSession.NewPropertyFilter(AggOutboundIPSchema.SummaryOnlyQueryProperty, summaryOnly)
     }), pageSize));
 }
예제 #6
0
 public List <TenantThrottleInfo> GetTenantThrottlingDigest(int partitionId = 0, Guid?tenantId = null, bool overriddenOnly = false, int tenantCount = 50, bool throttledOnly = true)
 {
     return(this.DataProvider.Find <TenantThrottleInfo>(QueryFilter.AndTogether(new QueryFilter[]
     {
         ReportingSession.NewPropertyFilter(DalHelper.PhysicalInstanceKeyProp, partitionId),
         ReportingSession.NewPropertyFilter(ReportingCommonSchema.OrganizationalUnitRootProperty, tenantId),
         ReportingSession.NewPropertyFilter(ReportingCommonSchema.OverriddenOnlyProperty, overriddenOnly),
         ReportingSession.NewPropertyFilter(ReportingCommonSchema.DataCountProperty, tenantCount),
         ReportingSession.NewPropertyFilter(ReportingCommonSchema.ThrottledOnlyProperty, throttledOnly)
     }), null, true, null).Cast <TenantThrottleInfo>().ToList <TenantThrottleInfo>());
 }
예제 #7
0
        public bool CheckForGoodMailFromRange(int lastNMinutes, int goodMessageThreshold, IPAddress startingIpAddress, IPAddress endIpAddress)
        {
            List <GoodMessageData> source = this.DataProvider.Find <GoodMessageData>(QueryFilter.AndTogether(new QueryFilter[]
            {
                ReportingSession.NewPropertyFilter(GoodMessageSchema.LastNMinutesQueryProperty, lastNMinutes),
                ReportingSession.NewPropertyFilter(GoodMessageSchema.MinimumGoodMessageCountQueryProperty, goodMessageThreshold),
                ReportingSession.NewPropertyFilter(GoodMessageSchema.StartingIPAddressQueryProperty, startingIpAddress),
                ReportingSession.NewPropertyFilter(GoodMessageSchema.EndIPAddressQueryProperty, endIpAddress)
            }), null, true, null).Cast <GoodMessageData>().ToList <GoodMessageData>();

            return(source.Any((GoodMessageData goodMsgData) => goodMsgData.GoodMessageExists));
        }
예제 #8
0
        private IPagedReader <T> GetPagedReader <T>(QueryFilter queryFilter, int pageSize) where T : IConfigurable, new()
        {
            List <IPagedReader <T> > list = new List <IPagedReader <T> >();

            foreach (object propertyValue in ((IPartitionedDataProvider)this.DataProvider).GetAllPhysicalPartitions())
            {
                list.Add(new ConfigDataProviderPagedReader <T>(this.DataProvider, null, QueryFilter.AndTogether(new QueryFilter[]
                {
                    ReportingSession.NewPropertyFilter(DalHelper.PhysicalInstanceKeyProp, propertyValue),
                    queryFilter
                }), null, pageSize));
            }
            return(new CompositePagedReader <T>(list.ToArray()));
        }