cr feedback

This commit is contained in:
Ryan Nowak 2014-02-04 13:54:16 -08:00
parent 0eb5ff0b87
commit cd0b684094
4 changed files with 4 additions and 23 deletions

View File

@ -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;
}
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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": {}
}
}