-
Notifications
You must be signed in to change notification settings - Fork 191
Adding option to configure services when exposing the ASP.NET 5 pipel… #468
Conversation
Hi @JunTaoLuo, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
serviceCollection.AddInstance(new FakeService()); | ||
}); | ||
|
||
Assert.NotNull(serviceProvider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to assert that you can actually resolve the FakeService
🆙📅 |
|
@@ -65,23 +66,29 @@ public static IApplicationBuilder UseOwin(this IApplicationBuilder builder, Acti | |||
return builder; | |||
} | |||
|
|||
public static IApplicationBuilder UseBuilder(this AddMiddleware app) | |||
public static IApplicationBuilder UseBuilder(this AddMiddleware app, Action<IServiceCollection> configureServices = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No optional params. Add 2 overloads
5ab468f
to
8f4c409
Compare
🆙📅 |
@@ -10,7 +10,8 @@ | |||
"keyFile": "../../tools/Key.snk" | |||
}, | |||
"dependencies": { | |||
"Microsoft.AspNet.Http": "1.0.0-*" | |||
"Microsoft.AspNet.Http": "1.0.0-*", | |||
"Microsoft.Extensions.DependencyInjection": "1.0.0-*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Microsoft.Extensions.DependencyInjection.Abstractions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the implementation ServiceCollection
from DependencyInjection
. That is not available in DependencyInject.Abstractions
.
Squash and |
using Microsoft.Extensions.DependencyInjection; | ||
using Xunit; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline.
|
35e25ee
to
19e42a4
Compare
19e42a4
to
fbec068
Compare
…ine via OWIN #398