Adding standard implementation of IContextAccessor<>

This commit is contained in:
Louis DeJardin 2014-03-19 14:26:04 -07:00
parent c39a41bd9f
commit 7b038d4e31
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,13 @@ namespace Microsoft.AspNet.Hosting
yield return describer.Transient<ITypeActivator, TypeActivator>();
yield return new ServiceDescriptor
{
ServiceType = typeof(IContextAccessor<>),
ImplementationType = typeof(ContextAccessor<>),
Lifecycle = LifecycleKind.Scoped
};
// The default IDataProtectionProvider is a singleton.
// Note: DPAPI isn't usable in IIS where the user profile hasn't been loaded, but loading DPAPI
// is deferred until the first call to Protect / Unprotect. It's up to an IIS-based host to