Add IOptionsAccessor as a default service
This commit is contained in:
parent
71d19e9f71
commit
8695da085b
|
|
@ -59,6 +59,14 @@ namespace Microsoft.AspNet.Hosting
|
||||||
Lifecycle = LifecycleKind.Scoped
|
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 (PlatformHelper.IsMono)
|
||||||
{
|
{
|
||||||
#if NET45
|
#if NET45
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue