public string CreateUrlFromInput(object input) { if (Input == null) { throw new InvalidOperationException("Cannot call this method if the RouteDefinition has not input type"); } return(Input.CreateUrlFromInput(input)); }
public string CreateUrlFromInput(object input) { if (input is IMakeMyOwnUrl) { return(input.As <IMakeMyOwnUrl>().ToUrlPart(Pattern)); } if (input == null) { return(Pattern); } if (Input == null) { throw new InvalidOperationException("Cannot call this method if the RouteDefinition has not input type"); } return(Input.CreateUrlFromInput(input)); }