Click or drag to resize

RoutingRulesSection Class

Represents a ConfigurationSection where multiple RoutingRules can be setup
Inheritance Hierarchy

Namespace:  SMTPRouter.Windows.Configuration
Assembly:  SMTPRouter.Windows (in SMTPRouter.Windows.dll) Version: 1.0.0.3 (1.0.0.3)
Syntax
public sealed class RoutingRulesSection : ConfigurationSection

The RoutingRulesSection type exposes the following members.

Constructors
  NameDescription
Public methodRoutingRulesSection
Initializes a new instance of the ConfigurationSection
Top
Properties
  NameDescription
Public propertyCurrentConfiguration
Gets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to.
(Inherited from ConfigurationElement.)
Public propertyElementInformation
Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object.
(Inherited from ConfigurationElement.)
Public propertyLockAllAttributesExcept
Gets the collection of locked attributes.
(Inherited from ConfigurationElement.)
Public propertyLockAllElementsExcept
Gets the collection of locked elements.
(Inherited from ConfigurationElement.)
Public propertyLockAttributes
Gets the collection of locked attributes
(Inherited from ConfigurationElement.)
Public propertyLockElements
Gets the collection of locked elements.
(Inherited from ConfigurationElement.)
Public propertyLockItem
Gets or sets a value indicating whether the element is locked.
(Inherited from ConfigurationElement.)
Public propertyRoutingRules
A collection of routing rules to be set in the configuration file
Public propertySectionInformation
Gets a SectionInformation object that contains the non-customizable information and functionality of the ConfigurationSection object.
(Inherited from ConfigurationSection.)
Top
Methods
  NameDescription
Public methodEquals
Compares the current ConfigurationElement instance to the specified object.
(Inherited from ConfigurationElement.)
Public methodGetHashCode
Gets a unique value representing the current ConfigurationElement instance.
(Inherited from ConfigurationElement.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsReadOnly
Gets a value indicating whether the ConfigurationElement object is read-only.
(Inherited from ConfigurationElement.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
The syntax must be followed precisely otherwise the system will not accept the routing rule
Examples
This is how the App.Config must be setup in order to be processed by this class:
<RoutingRulesConfiguration>
  <RoutingRules>
    <add executionSequence="10"
         type="SMTPRouter.Models.MailFromDomainRoutingRule, SMTPRouter"
         params="Domain=gmail.com"
         smtpkey="gmail" />
    <add executionSequence="20"
         type="SMTPRouter.Models.MailFromDomainRoutingRule, SMTPRouter"
         params="Domain=hotmail.com;"
         smtpkey="hotmail" />
    <add executionSequence="30"
         type="SMTPRouter.Models.MailFromRegexMatchRoutingRule, SMTPRouter"
         params="RegexExpression=\A[Uu](\d{5})\z"
         smtpkey="hotmail" />
  </RoutingRules>
See Also