cr feedback
This commit is contained in:
parent
0eb5ff0b87
commit
cd0b684094
|
|
@ -1,18 +0,0 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.AspNet.Routing.Owin;
|
||||
using Owin;
|
||||
|
||||
namespace RoutingSample
|
||||
{
|
||||
public static class AppBuilderExtensions
|
||||
{
|
||||
public static IRouteCollection UseRouter(this IAppBuilder app)
|
||||
{
|
||||
IRouteCollection routes = null;
|
||||
app.UseBuilder((b) => routes = b.UseRouter());
|
||||
return routes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,9 +9,9 @@ namespace RoutingSample
|
|||
{
|
||||
public class HttpContextRouteEndpoint : IRouteEndpoint
|
||||
{
|
||||
private readonly Func<HttpContext, Task> _appFunc;
|
||||
private readonly RequestDelegate _appFunc;
|
||||
|
||||
public HttpContextRouteEndpoint(Func<HttpContext, Task> appFunc)
|
||||
public HttpContextRouteEndpoint(RequestDelegate appFunc)
|
||||
{
|
||||
_appFunc = appFunc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ namespace RoutingSample
|
|||
public async Task<bool> Send(HttpContext context)
|
||||
{
|
||||
var owinContext = context.GetFeature<ICanHasOwinEnvironment>().Environment;
|
||||
return _appFunc(owinContext);
|
||||
await _appFunc(owinContext);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
"dependencies": {
|
||||
"Owin": "1.0",
|
||||
"Microsoft.Owin" : "2.1.0",
|
||||
"Microsoft.Owin.Diagnostics" : "2.1.0",
|
||||
"Microsoft.Owin.Diagnostics" : "2.1.0",
|
||||
"Microsoft.Owin.Host.HttpListener" : "2.1.0",
|
||||
"Microsoft.Owin.Hosting" : "2.1.0"
|
||||
}
|
||||
},
|
||||
"k10": {}
|
||||
"k10": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue