コード例 #1
0
 public LifetimeScope()
 {
     LifetimeScopeStore.Get <TContext>().OpenScope();
 }
コード例 #2
0
 public override object Resolve(CreationContext context)
 {
     return(LifetimeScopeStore.Get <TContext>()
            .GetOrAdd(this, lifestyleManager => new ComponentInstance(lifestyleManager, base.Resolve(context)))
            .Instance);
 }
コード例 #3
0
 public void Dispose()
 {
     LifetimeScopeStore.Get <TContext>().CloseScope();
 }
コード例 #4
0
 public override bool Release(object instance)
 {
     LifetimeScopeStore.Get <TContext>().TryRemove(this);
     return(base.Release(instance));
 }