Esempio n. 1
0
 /// <summary>
 /// Constructs a new instance of the <see cref="CursorSubject{T}" /> class.
 /// </summary>
 /// <param name="isForwardOnly"><see langword="True"/> if the cursor can only be moved forward;
 /// otherwise, <see langword="false"/>.</param>
 public CursorSubject(bool isForwardOnly)
 {
     cursor = new ObservableCursor <T>(isForwardOnly, enableBranchOptimizations: isForwardOnly);
 }
Esempio n. 2
0
        /// <summary>
        /// Constructs a new instance of the <see cref="CursorSubject{T}" /> class.
        /// </summary>
        /// <param name="isForwardOnly"><see langword="True"/> if the cursor can only be moved forward;
        /// otherwise, <see langword="false"/>.</param>
        /// <param name="enableBranchOptimizations">Specifies whether a forward-only cursor is allowed to truncate the buffered
        /// sequence, if necessary, whenever a branch is moved.  In the future, it may control other kinds of branch optimizations
        /// as well.  The default value is <see langword="true"/>.</param>
        public CursorSubject(bool isForwardOnly, bool enableBranchOptimizations)
        {
            Contract.Requires(isForwardOnly || !enableBranchOptimizations);

            cursor = new ObservableCursor <T>(isForwardOnly, enableBranchOptimizations);
        }
Esempio n. 3
0
 /// <summary>
 /// Constructs a new instance of the <see cref="CursorSubject{T}" /> class with bidirectional behavior.
 /// </summary>
 public CursorSubject()
 {
     cursor = new ObservableCursor <T>(isForwardOnly: false, enableBranchOptimizations: false);
 }