Add IOptionsAccessor as a default service

This commit is contained in:
Hao Kung 2014-05-15 16:24:39 -07:00
parent 71d19e9f71
commit 8695da085b
1 changed files with 8 additions and 0 deletions

View File

@ -59,6 +59,14 @@ namespace Microsoft.AspNet.Hosting
Lifecycle = LifecycleKind.Scoped
};
// TODO: Review whether this is the right long term home, and whether Scoped is correct lifetime
yield return new ServiceDescriptor
{
ServiceType = typeof(IOptionsAccessor<>),
ImplementationType = typeof(OptionsAccessor<>),
Lifecycle = LifecycleKind.Scoped
};
if (PlatformHelper.IsMono)
{
#if NET45