Hidistro.Core/Configuration/HiConfiguration.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hidistro.Core.Configuration
{
    using Hidistro.Core;
    using Hidistro.Core.Enums;
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.IO;
    using System.Web;
    using System.Web.Caching;
    using System.Web.Security;
    using System.Xml;

    public class HiConfiguration
    {
        private string adminFolder = "admin";
        private Hidistro.Core.Configuration.AppLocation app;
        private const string ConfigCacheKey = "FileCache-Configuragion";
        private string emailEncoding = "utf-8";
        private string emailRegex = @"([a-zA-Z\.0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3,4}){1,2})";
        private const string filesPath = "/";
        private readonly Dictionary<string, string> integratedApplications = new Dictionary<string, string>();
        private int passwordMaxLength = 0x10;
        private Hidistro.Core.Configuration.RolesConfiguration roleConfiguration;
        private int shippingAddressQuantity = 5;
        private short smtpServerConnectionLimit = -1;
        private SSLSettings ssl = SSLSettings.Ignore;
        private readonly Dictionary<string, string> supportedLanguages = new Dictionary<string, string>();
        public static readonly int[,] ThumbnailSizes = new int[,] { { 10, 10 }, { 0x16, 0x16 }, { 40, 40 }, { 100, 100 }, { 160, 160 }, { 310, 310 } };
        private int usernameMaxLength = 20;
        private int usernameMinLength = 3;
        private string usernameRegex = "[一-龥a-zA-Z0-9]+[一-龥_a-zA-Z0-9]*";
        private bool useUniversalCode = false;
        private readonly XmlDocument xmlDoc;

        public HiConfiguration(XmlDocument doc)
        {
            this.xmlDoc = doc;
            this.LoadValuesFromConfigurationXml();
        }

        internal void GetAppLocation(XmlNode node)
        {
            this.app = Hidistro.Core.Configuration.AppLocation.Create(node);
        }

        internal void GetAttributes(XmlAttributeCollection attributeCollection)
        {
            XmlAttribute attribute = attributeCollection["smtpServerConnectionLimit"];
            if (attribute != null)
            {
                this.smtpServerConnectionLimit = short.Parse(attribute.Value, CultureInfo.InvariantCulture);
            }
            else
            {
                this.smtpServerConnectionLimit = -1;
            }
            attribute = attributeCollection["ssl"];
            if (attribute != null)
            {
后面还有 278 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。