public void AddPriorityItem(Lifetime lifetime, T value) => AddPriorityItem(new Lifetimed <T>(lifetime, value));
public void Add(Lifetime lifetime, T value) => Add(new Lifetimed <T>(lifetime, value));
public Lifetimed(Lifetime lifetime, T value) { Lifetime = lifetime; Value = value; }
public void Deconstruct(out Lifetime lifetime, out T value) { lifetime = Lifetime; value = Value; }
void ITerminationHandler.OnTermination(Lifetime lifetime) => Value = default;
/// <summary>Creates and binds to the lifetime.</summary> /// <param name="lifetime">When this lifetime is closed, the last of the sequential lifetimes is closed too.</param> public SequentialLifetimes(Lifetime lifetime) { myParentLifetime = lifetime; }