public string Format(IResourceMatch match) { if (!HasParameters) { return(_consolidatedUrlString); } var formattedString = _consolidatedUrlString; foreach (var placeholder in _placeholders) { var replacementValue = match.GetSubValue(placeholder); formattedString = formattedString.Replace("{" + placeholder + "}", replacementValue); } return(formattedString); }
public string Format(IResourceMatch match) { if (!HasParameters) { return(_consolidatedUrlString); } var formattedString = _consolidatedUrlString; foreach (Match rxMatch in _matches) { var name = rxMatch.Groups["name"].Value; var replacementValue = match.GetSubValue(name); formattedString = formattedString.Replace("{" + name + "}", replacementValue); } return(formattedString); }
private string GetConsolidatedUrl(IResourceMatch match) { return(ConsolidatedUrlTemplate.Format(match)); }
public InverseResourceMatch(IResourceMatch inner) { _inner = inner; }
public static IResourceMatch Inverse(this IResourceMatch match) { return(new InverseResourceMatch(match)); }
public InverseResourceMatch(IResourceMatch inner) { _inner = inner; }
private string GetConsolidatedUrl(IResourceMatch match) { return ConsolidatedUrlTemplate.Format(match); }
public bool Matches(IResourceMatch resourceMatch) { return(_placeholders.All(resourceMatch.HasSubValue)); }