public LifetimeScope() { LifetimeScopeStore.Get <TContext>().OpenScope(); }
public override object Resolve(CreationContext context) { return(LifetimeScopeStore.Get <TContext>() .GetOrAdd(this, lifestyleManager => new ComponentInstance(lifestyleManager, base.Resolve(context))) .Instance); }
public void Dispose() { LifetimeScopeStore.Get <TContext>().CloseScope(); }
public override bool Release(object instance) { LifetimeScopeStore.Get <TContext>().TryRemove(this); return(base.Release(instance)); }