Beispiel #1
0
 public void AddPriorityItem(Lifetime lifetime, T value) => AddPriorityItem(new Lifetimed <T>(lifetime, value));
Beispiel #2
0
 public void Add(Lifetime lifetime, T value) => Add(new Lifetimed <T>(lifetime, value));
Beispiel #3
0
 public Lifetimed(Lifetime lifetime, T value)
 {
     Lifetime = lifetime;
     Value    = value;
 }
Beispiel #4
0
 public void Deconstruct(out Lifetime lifetime, out T value)
 {
     lifetime = Lifetime;
     value    = Value;
 }
Beispiel #5
0
 void ITerminationHandler.OnTermination(Lifetime lifetime) => Value = default;
Beispiel #6
0
 /// <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;
 }