Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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>());
 }
Exemplo n.º 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));
        }
Exemplo n.º 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()));
        }