Пример #1
0
 /// <inheritdoc/>
 public void Reset()
 {
     _remainder   = null;
     _increase    = !RouteMode.HasFlag(RouteMode.Reverse);
     CurrentIndex = CInd;
     NextIndex    = NInd;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoutedList{T}"/> class that is empty and has the specified initial capacity and the default initial route type and route mode.
 /// </summary>
 /// <param name="capacity"></param>
 public RoutedList(int capacity) : base(capacity)
 {
     _remainder   = null;
     RouteType    = RouteType.Linear;
     RouteMode    = RouteMode.Default;
     _increase    = !RouteMode.HasFlag(RouteMode.Reverse);
     CurrentIndex = CInd;
     BeginIndex   = BInd;
     EndIndex     = EInd;
     NextIndex    = NInd;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoutedList{T}"/> class that is empty and has the specified initial capacity, route type and route mode.
 /// </summary>
 /// <param name="capacity"></param>
 /// <param name="routeType"></param>
 /// <param name="routeMode"></param>
 public RoutedList(int capacity, RouteType routeType, RouteMode routeMode) : base(capacity)
 {
     _remainder   = null;
     RouteType    = routeType;
     RouteMode    = routeMode;
     _increase    = !RouteMode.HasFlag(RouteMode.Reverse);
     CurrentIndex = CInd;
     BeginIndex   = BInd;
     EndIndex     = EInd;
     NextIndex    = NInd;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoutedList{T}"/> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied and the specified initial route type and route mode.
 /// </summary>
 /// <param name="collection"></param>
 /// <param name="routeType"></param>
 /// <param name="routeMode"></param>
 public RoutedList(IEnumerable <T> collection, RouteType routeType, RouteMode routeMode) : base(collection)
 {
     _remainder   = null;
     RouteType    = routeType;
     RouteMode    = routeMode;
     _increase    = !RouteMode.HasFlag(RouteMode.Reverse);
     CurrentIndex = CInd;
     BeginIndex   = BInd;
     EndIndex     = EInd;
     NextIndex    = NInd;
 }
Пример #5
0
 /// <inheritdoc/>
 public void SetRouteMode(RouteMode routeMode)
 {
     if (RouteMode != routeMode)
     {
         _remainder = null;
     }
     else
     {
         return;
     }
     if (RouteMode.HasFlag(RouteMode.Reverse) != routeMode.HasFlag(RouteMode.Reverse))
     {
         _increase = !_increase;
     }
     RouteMode  = routeMode;
     BeginIndex = BInd;
     EndIndex   = EInd;
     NextIndex  = NInd;
 }