using System; using System.Collections; namespace URLRewriter.Config { /// /// The RewriterRuleCollection models a set of RewriterRules in the Web.config file. /// /// /// The RewriterRuleCollection is expressed in XML as: /// /// <RewriterRule> /// <LookFor>pattern to search for</LookFor> /// <SendTo>string to redirect to</LookFor> /// <RewriterRule> /// <RewriterRule> /// <LookFor>pattern to search for</LookFor> /// <SendTo>string to redirect to</LookFor> /// <RewriterRule> /// ... /// <RewriterRule> /// <LookFor>pattern to search for</LookFor> /// <SendTo>string to redirect to</LookFor> /// <RewriterRule> /// /// [Serializable()] public class RewriterRuleCollection : CollectionBase { /// /// Adds a new RewriterRule to the collection. /// /// A RewriterRule instance. public virtual void Add(RewriterRule r) { this.InnerList.Add(r); } /// /// Gets or sets a RewriterRule at a specified ordinal index. /// public RewriterRule this[int index] { get { return (RewriterRule) this.InnerList[index]; } set { this.InnerList[index] = value; } } } }