Fix for #36 - IBuilder extension methods should take IRouter
This commit is contained in:
parent
5dc8267920
commit
5616ce0bfa
|
|
@ -1,17 +1,15 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNet;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Routing;
|
||||
|
||||
namespace Microsoft.AspNet.Builder
|
||||
{
|
||||
public static class BuilderExtensions
|
||||
{
|
||||
public static IBuilder UseRouter(this IBuilder builder, IRouteCollection routes)
|
||||
public static IBuilder UseRouter([NotNull] this IBuilder builder, [NotNull] IRouter router)
|
||||
{
|
||||
builder.Use((next) => new RouterMiddleware(next, routes).Invoke);
|
||||
builder.Use((next) => new RouterMiddleware(next, router).Invoke);
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue