rendered paste bodyusing System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
namespace xxx.xxx.WorkFlows.SharedActivities.Configuration
{
public class RegexParserElement : ConfigurationElement
{
#region Fields
private static ConfigurationProperty o_RegexPattern;
private static ConfigurationProperty o_Groups;
private static ConfigurationPropertyCollection oc_Properties;
#endregion
#region Properties
#region RegexPattern
public string RegexPattern
{
get
{
return (string)this[o_RegexPattern];
}
set
{
this[o_RegexPattern] = value;
}
}
#endregion
#region Groups
public RegexParserGroupElementCollection Groups
{
get
{
return (RegexParserGroupElementCollection)this[o_Groups];
}
}
#endregion
#region Properties
/// <summary>
/// Override the Properties collection and return our custom one.
/// </summary>
protected override ConfigurationPropertyCollection Properties
{
get
{
return oc_Properties;
}
}
#endregion
#endregion
#region Constructor
static RegexParserElement()
{
o_RegexPattern = new ConfigurationProperty("regexPattern", typeof(string), string.Empty, ConfigurationPropertyOptions.IsRequired);
o_Groups = new ConfigurationProperty("groups", typeof(RegexParserGroupElementCollection), null, ConfigurationPropertyOptions.IsRequired);
oc_Properties = new ConfigurationPropertyCollection();
oc_Properties.Add(o_RegexPattern);
oc_Properties.Add(o_Groups);
}
#endregion
}
}