diff --git a/src/Microsoft.AspNet.Http/Extensions/MapExtensions.cs b/src/Microsoft.AspNet.Http/Extensions/MapExtensions.cs
index b4a44adddf..9696b99da7 100644
--- a/src/Microsoft.AspNet.Http/Extensions/MapExtensions.cs
+++ b/src/Microsoft.AspNet.Http/Extensions/MapExtensions.cs
@@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Builder
/// The path to match
/// The branch to take for positive path matches
///
- public static IBuilder Map([NotNull] this IBuilder app, [NotNull] string pathMatch, [NotNull] Action configuration)
+ public static IApplicationBuilder Map([NotNull] this IApplicationBuilder app, [NotNull] string pathMatch, [NotNull] Action configuration)
{
return Map(app, new PathString(pathMatch), configuration);
}
@@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Builder
/// The path to match
/// The branch to take for positive path matches
///
- public static IBuilder Map([NotNull] this IBuilder app, PathString pathMatch, [NotNull] Action configuration)
+ public static IApplicationBuilder Map([NotNull] this IApplicationBuilder app, PathString pathMatch, [NotNull] Action configuration)
{
if (pathMatch.HasValue && pathMatch.Value.EndsWith("/", StringComparison.Ordinal))
{
@@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Builder
}
// create branch
- IBuilder branchBuilder = app.New();
+ var branchBuilder = app.New();
configuration(branchBuilder);
var branch = branchBuilder.Build();
diff --git a/src/Microsoft.AspNet.Http/Extensions/MapWhenExtensions.cs b/src/Microsoft.AspNet.Http/Extensions/MapWhenExtensions.cs
index b46bbbe0e9..63e65a0a11 100644
--- a/src/Microsoft.AspNet.Http/Extensions/MapWhenExtensions.cs
+++ b/src/Microsoft.AspNet.Http/Extensions/MapWhenExtensions.cs
@@ -23,10 +23,10 @@ namespace Microsoft.AspNet.Builder
/// Invoked with the request environment to determine if the branch should be taken
/// Configures a branch to take
///
- public static IBuilder MapWhen([NotNull] this IBuilder app, [NotNull] Predicate predicate, [NotNull] Action configuration)
+ public static IApplicationBuilder MapWhen([NotNull] this IApplicationBuilder app, [NotNull] Predicate predicate, [NotNull] Action configuration)
{
// create branch
- IBuilder branchBuilder = app.New();
+ var branchBuilder = app.New();
configuration(branchBuilder);
var branch = branchBuilder.Build();
@@ -46,10 +46,10 @@ namespace Microsoft.AspNet.Builder
/// Invoked asynchronously with the request environment to determine if the branch should be taken
/// Configures a branch to take
///
- public static IBuilder MapWhenAsync([NotNull] this IBuilder app, [NotNull] PredicateAsync predicate, [NotNull] Action configuration)
+ public static IApplicationBuilder MapWhenAsync([NotNull] this IApplicationBuilder app, [NotNull] PredicateAsync predicate, [NotNull] Action configuration)
{
// create branch
- IBuilder branchBuilder = app.New();
+ var branchBuilder = app.New();
configuration(branchBuilder);
var branch = branchBuilder.Build();
diff --git a/src/Microsoft.AspNet.Http/Extensions/RunExtensions.cs b/src/Microsoft.AspNet.Http/Extensions/RunExtensions.cs
index de565c2e3d..694dd3ec0f 100644
--- a/src/Microsoft.AspNet.Http/Extensions/RunExtensions.cs
+++ b/src/Microsoft.AspNet.Http/Extensions/RunExtensions.cs
@@ -8,7 +8,7 @@ namespace Microsoft.AspNet.Builder
{
public static class RunExtensions
{
- public static void Run([NotNull] this IBuilder app, [NotNull] RequestDelegate handler)
+ public static void Run([NotNull] this IApplicationBuilder app, [NotNull] RequestDelegate handler)
{
app.Use(_ => handler);
}
diff --git a/src/Microsoft.AspNet.Http/Extensions/UseExtensions.cs b/src/Microsoft.AspNet.Http/Extensions/UseExtensions.cs
index 3f0f8f51c3..038b14e03e 100644
--- a/src/Microsoft.AspNet.Http/Extensions/UseExtensions.cs
+++ b/src/Microsoft.AspNet.Http/Extensions/UseExtensions.cs
@@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Builder
///
/// A function that handles the request or calls the given next function.
///
- public static IBuilder Use(this IBuilder app, Func, Task> middleware)
+ public static IApplicationBuilder Use(this IApplicationBuilder app, Func, Task> middleware)
{
return app.Use(next =>
{
diff --git a/src/Microsoft.AspNet.Http/IBuilder.cs b/src/Microsoft.AspNet.Http/IApplicationBuilder.cs
similarity index 75%
rename from src/Microsoft.AspNet.Http/IBuilder.cs
rename to src/Microsoft.AspNet.Http/IApplicationBuilder.cs
index 1673390e07..bed7c50f0d 100644
--- a/src/Microsoft.AspNet.Http/IBuilder.cs
+++ b/src/Microsoft.AspNet.Http/IApplicationBuilder.cs
@@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Microsoft.AspNet.Builder
{
- public interface IBuilder
+ public interface IApplicationBuilder
{
IServiceProvider ApplicationServices { get; set; }
@@ -14,9 +14,9 @@ namespace Microsoft.AspNet.Builder
IDictionary Properties { get; set; }
- IBuilder Use(Func middleware);
+ IApplicationBuilder Use(Func middleware);
- IBuilder New();
+ IApplicationBuilder New();
RequestDelegate Build();
}
diff --git a/src/Microsoft.AspNet.Owin/OwinExtensions.cs b/src/Microsoft.AspNet.Owin/OwinExtensions.cs
index 674befa4f9..5bd2e0a9fa 100644
--- a/src/Microsoft.AspNet.Owin/OwinExtensions.cs
+++ b/src/Microsoft.AspNet.Owin/OwinExtensions.cs
@@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Builder
public static class OwinExtensions
{
- public static AddMiddleware UseOwin(this IBuilder builder)
+ public static AddMiddleware UseOwin(this IApplicationBuilder builder)
{
AddMiddleware add = middleware =>
{
@@ -58,17 +58,17 @@ namespace Microsoft.AspNet.Builder
return add;
}
- public static IBuilder UseOwin(this IBuilder builder, Action pipeline)
+ public static IApplicationBuilder UseOwin(this IApplicationBuilder builder, Action pipeline)
{
pipeline(builder.UseOwin());
return builder;
}
- public static IBuilder UseBuilder(this AddMiddleware app)
+ public static IApplicationBuilder UseBuilder(this AddMiddleware app)
{
// Adapt WebSockets by default.
app(OwinWebSocketAcceptAdapter.AdaptWebSockets);
- var builder = new Builder(serviceProvider: null);
+ var builder = new ApplicationBuilder(serviceProvider: null);
CreateMiddleware middleware = CreateMiddlewareFactory(exit =>
{
@@ -111,7 +111,7 @@ namespace Microsoft.AspNet.Builder
};
}
- public static AddMiddleware UseBuilder(this AddMiddleware app, Action pipeline)
+ public static AddMiddleware UseBuilder(this AddMiddleware app, Action pipeline)
{
var builder = app.UseBuilder();
pipeline(builder);
diff --git a/src/Microsoft.AspNet.PipelineCore/Builder.cs b/src/Microsoft.AspNet.PipelineCore/ApplicationBuilder.cs
similarity index 86%
rename from src/Microsoft.AspNet.PipelineCore/Builder.cs
rename to src/Microsoft.AspNet.PipelineCore/ApplicationBuilder.cs
index 12a95ebd8f..71f6ef267b 100644
--- a/src/Microsoft.AspNet.PipelineCore/Builder.cs
+++ b/src/Microsoft.AspNet.PipelineCore/ApplicationBuilder.cs
@@ -5,22 +5,21 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Infrastructure;
namespace Microsoft.AspNet.Builder
{
- public class Builder : IBuilder
+ public class ApplicationBuilder : IApplicationBuilder
{
private readonly IList> _components = new List>();
- public Builder(IServiceProvider serviceProvider)
+ public ApplicationBuilder(IServiceProvider serviceProvider)
{
Properties = new Dictionary();
ApplicationServices = serviceProvider;
}
- private Builder(Builder builder)
+ private ApplicationBuilder(ApplicationBuilder builder)
{
Properties = builder.Properties;
}
@@ -62,15 +61,15 @@ namespace Microsoft.AspNet.Builder
Properties[key] = value;
}
- public IBuilder Use(Func middleware)
+ public IApplicationBuilder Use(Func middleware)
{
_components.Add(middleware);
return this;
}
- public IBuilder New()
+ public IApplicationBuilder New()
{
- return new Builder(this);
+ return new ApplicationBuilder(this);
}
public RequestDelegate Build()
diff --git a/test/Microsoft.AspNet.Http.Tests/MapPathMiddlewareTests.cs b/test/Microsoft.AspNet.Http.Tests/MapPathMiddlewareTests.cs
index 4a9d68dd45..bdaa1eeedb 100644
--- a/test/Microsoft.AspNet.Http.Tests/MapPathMiddlewareTests.cs
+++ b/test/Microsoft.AspNet.Http.Tests/MapPathMiddlewareTests.cs
@@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Builder.Extensions
{
public class MapPathMiddlewareTests
{
- private static readonly Action ActionNotImplemented = new Action(_ => { throw new NotImplementedException(); });
+ private static readonly Action ActionNotImplemented = new Action(_ => { throw new NotImplementedException(); });
private static Task Success(HttpContext context)
{
@@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Builder.Extensions
return Task.FromResult