Fix broken benchmarks

The tests for matching still compile but do the wrong thing, because
they aren't setting up the HTTP method metadata correctly.

Adding back an overload of CreateEndpoint that's like what was there
before.
This commit is contained in:
Ryan Nowak 2018-08-20 20:09:33 -07:00
parent 1680b9f4fc
commit 78cf97cf3a
1 changed files with 8 additions and 0 deletions

View File

@ -97,6 +97,14 @@ namespace Microsoft.AspNetCore.Routing
}
}
protected RouteEndpoint CreateEndpoint(string template, string httpMethod)
{
return CreateEndpoint(template, metadata: new object[]
{
new HttpMethodMetadata(new string[]{ httpMethod, }),
});
}
protected RouteEndpoint CreateEndpoint(
string template,
object defaults = null,