public static Lifetime CreateChildLifetime(this ILifetime lt) { var ret = new Lifetime(); lt.OnDisposed(() => { if (ret.IsExpired == false) { ret.Dispose(); } }); return(ret); }