public bool Matches(Uri location, IEnumerable<Regex> matchingExpressions)
{
if (location == null)
{
throw new ArgumentNullException("location");
}
if (location.IsAbsoluteUri == false)
{
throw new ArgumentException(Resources.Uri_LocationMustBeAbsolute, "location");
}
if (matchingExpressions == null)
{
throw new ArgumentNullException("matchingExpressions");
}
return matchingExpressions.Any(x => x.IsMatch(location.ToString()));
}