Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Created July 11, 2014 13:01
Show Gist options
  • Save hagbarddenstore/9ae61c2885b5cd262dbd to your computer and use it in GitHub Desktop.
Save hagbarddenstore/9ae61c2885b5cd262dbd to your computer and use it in GitHub Desktop.
from match in Regex.Matches(actionRoute.Url, "\\{(\\w+)\\}").OfType<Match>()
let parameterName = match.Groups[1].Value
join parameter in action.GetParameters() on parameterName.ToLower() equals parameter.Name.ToLower()
select new { Name = parameterName, Parameter = parameter }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment