using System;
namespace URLRewriter.Config
{
///
/// Represents a rewriter rule. A rewriter rule is composed of a pattern to search for and a string to replace
/// the pattern with (if matched).
///
[Serializable()]
public class RewriterRule
{
// private member variables...
private string lookFor, sendTo;
#region Public Properties
///
/// Gets or sets the pattern to look for.
///
/// LookFor is a regular expression pattern. Therefore, you might need to escape
/// characters in the pattern that are reserved characters in regular expression syntax (., ?, ^, $, etc.).
///
/// The pattern is searched for using the System.Text.RegularExpression.Regex class's IsMatch()
/// method. The pattern is case insensitive.
public string LookFor
{
get
{
return lookFor;
}
set
{
lookFor = value;
}
}
///
/// The string to replace the pattern with, if found.
///
/// The replacement string may use grouping symbols, like $1, $2, etc. Specifically, the
/// System.Text.RegularExpression.Regex class's Replace() method is used to replace
/// the match in with the value in SendTo.
public string SendTo
{
get
{
return sendTo;
}
set
{
sendTo = value;
}
}
#endregion
}
}