⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pageelement.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.Web.Configuration
{
    using System;
    using System.Configuration;
    using System.Globalization;

    public sealed class PageElement : ConfigurationElement
    {
        private static readonly ConfigurationProperty m_AbortOnError = new ConfigurationProperty("abortOnError", typeof(bool), true);
        private static readonly ConfigurationProperty m_Pageurl = new ConfigurationProperty("url", typeof(string), "", ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired);
        private static readonly ConfigurationProperty m_Param = new ConfigurationProperty(null, typeof(ParamElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
        private static ConfigurationPropertyCollection m_Properties = new ConfigurationPropertyCollection();

        public PageElement()
        {
            m_Properties.Add(m_Pageurl);
            m_Properties.Add(m_AbortOnError);
            m_Properties.Add(m_Param);
        }

        public PageElement(string elementName)
        {
            this.Pageurl = elementName;
        }

        [ConfigurationProperty("abortOnError", DefaultValue=true, IsRequired=true)]
        public bool AbortOnError
        {
            get
            {
                return (bool) base[m_AbortOnError];
            }
            set
            {
                base[m_AbortOnError] = value;
            }
        }

        [ConfigurationProperty("url", IsKey=true, IsRequired=true)]
        public string Pageurl
        {
            get
            {
                return ((string) base[m_Pageurl]).ToLower(CultureInfo.CurrentCulture);
            }
            set
            {
                base[m_Pageurl] = value;
            }
        }

        [ConfigurationProperty("page", IsDefaultCollection=true)]
        public ParamElementCollection Param
        {
            get
            {
                return (ParamElementCollection) base[m_Param];
            }
        }

        protected override ConfigurationPropertyCollection Properties
        {
            get
            {
                return m_Properties;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -