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