Add OptionsServices in UseServices

This commit is contained in:
Hao Kung 2014-06-03 15:03:57 -07:00
parent 44503744a3
commit 3fb1a06e25
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ using System.Reflection;
using Microsoft.AspNet.RequestContainer; using Microsoft.AspNet.RequestContainer;
using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback; using Microsoft.Framework.DependencyInjection.Fallback;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Builder namespace Microsoft.AspNet.Builder
{ {
@ -65,6 +66,7 @@ namespace Microsoft.AspNet.Builder
{ {
var serviceCollection = new ServiceCollection(); var serviceCollection = new ServiceCollection();
serviceCollection.Add(OptionsServices.GetDefaultServices());
configureServices(serviceCollection); configureServices(serviceCollection);
builder.ApplicationServices = serviceCollection.BuildServiceProvider(builder.ApplicationServices); builder.ApplicationServices = serviceCollection.BuildServiceProvider(builder.ApplicationServices);

View File

@ -2,7 +2,8 @@
"version": "0.1-alpha-*", "version": "0.1-alpha-*",
"dependencies": { "dependencies": {
"Microsoft.AspNet.Http": "0.1-alpha-*", "Microsoft.AspNet.Http": "0.1-alpha-*",
"Microsoft.Framework.DependencyInjection": "0.1-alpha-*" "Microsoft.Framework.DependencyInjection": "0.1-alpha-*",
"Microsoft.Framework.OptionsModel": "0.1-alpha-*"
}, },
"configurations": { "configurations": {
"net45": {}, "net45": {},