コード例 #1
0
 /// <summary>
 ///     Unwrap a stream inside a discrete cell to give a time-varying stream implementation.
 ///     When the discrete cell changes value, the output stream will fire the simultaneous firing (if one exists) from the stream which the discrete cell will hold at the end of the transaction.
 /// </summary>
 /// <typeparam name="T">The type of the stream.</typeparam>
 /// <param name="csa">The discrete cell containing the stream.</param>
 /// <returns>The unwrapped stream.</returns>
 public static Stream <T> SwitchEarlyS <T>(this DiscreteCell <Stream <T> > csa) => csa.Cell.SwitchEarlyS();
コード例 #2
0
 /// <summary>
 ///     Unwrap a cell inside a discrete cell to give a time-varying cell implementation.
 /// </summary>
 /// <typeparam name="T">The type of the cell.</typeparam>
 /// <param name="cca">The discrete cell containing a cell.</param>
 /// <returns>The unwrapped cell.</returns>
 public static Cell <T> SwitchC <T>(this DiscreteCell <Cell <T> > cca) => cca.Cell.SwitchC();
コード例 #3
0
 /// <summary>
 ///     Unwrap a discrete cell inside another discrete cell to give a time-varying cell implementation.
 /// </summary>
 /// <typeparam name="T">The type of the cell.</typeparam>
 /// <param name="cca">The discrete cell containing another discrete cell.</param>
 /// <returns>The unwrapped discrete cell.</returns>
 public static DiscreteCell <T> SwitchC <T>(this DiscreteCell <DiscreteCell <T> > cca) => new DiscreteCell <T>(cca.Cell.Map(c => c.Cell).SwitchC());
コード例 #4
0
 /// <summary>
 ///     Resolve the loop to specify what the <see cref="DiscreteCellLoop{T}" /> was a forward reference to.  This method
 ///     must be called inside the same transaction as the one in which this <see cref="DiscreteCellLoop{T}" /> instance was
 ///     created and used.
 ///     This requires an explicit transaction to be created with <see cref="Transaction.Run{T}(Func{T})" /> or
 ///     <see cref="Transaction.RunVoid(Action)" />.
 /// </summary>
 /// <param name="c">The cell that was forward referenced.</param>
 public void Loop(DiscreteCell <T> c)
 {
     this.streamLoop.Loop(c.Updates);
     this.cellLoop.Loop(c.Cell);
 }