📄 pageelement.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 + -