public static void WithMatchingPropertyNames(IServiceRoutes routes, Type requestType, string allowedVerbs)
{
var membersWithName = (from property in requestType.GetPublicProperties().Select(p => p.Name)
from name in PropertyNamesToMatch
where property.Equals(name, StringComparison.InvariantCultureIgnoreCase)
select "{{{0}}}".Fmt(property)).ToList();
if (membersWithName.Count == 0) return;
membersWithName.Insert(0, "/{0}".Fmt(requestType.Name));
var restPath = membersWithName.Join("/");
routes.Add(requestType, restPath: restPath, verbs: allowedVerbs, priority: AutoGenPriority);
}
}