示例#1
0
        public IPBlacklist(SiteStatusResponse response) : base(response)
        {
            if (response != null)
            {
                if (response.Security != null)
                {
                    if (response.Security.Acls != null && response.Security.Acls.Rules.Any())
                    {
                        var blockIpRule = response.Security.Acls.Rules.FirstOrDefault(r => r.Id == Enums.AclRule.BlacklistedIps.Name());

                        if (blockIpRule != null && blockIpRule.IPs != null)
                        {
                            BlockedIpAddresses = blockIpRule.IPs;
                        }
                    }
                }
            }
        }
示例#2
0
 public SiteStatus(SiteStatusResponse response) : base(response)
 {
     SiteId            = response.SiteId;
     StatusEnum        = response.StatusEnum;
     Status            = response.Status;
     Domain            = response.Domain;
     AccountId         = response.AccountId;
     AccelerationLevel = response.AccelerationLevel;
     SiteCreationDate  = response.SiteCreationDate.FromTotalMilliseconds();
     IPs                      = response.IPs;
     DNS                      = response.DNS;
     OriginalDNS              = response.OriginalDNS;
     Warnings                 = response.Warnings;
     Active                   = response.Active;
     AdditionalErrors         = response.AdditionalErrors;
     DisplayName              = response.DisplayName;
     Security                 = response.Security;
     SealLocation             = response.SealLocation;
     SSL                      = response.SSL;
     SiteDualFactorSettings   = response.SiteDualFactorSettings;
     LoginProtect             = response.LoginProtect;
     PerformanceConfiguration = response.PerformanceConfiguration;
     ExtendedDDOS             = response.ExtendedDDOS;
 }