Пример #1
0
 public IOrderedCollection <TK> Head(
     TK value,
     bool isInclusive = false)
 {
     return(new OrderedListDictionaryKeys <TK, TV>(
                _underlying,
                _range.Merge(
                    new BoundRange <TK>(
                        null,
                        new Bound <TK>(value, isInclusive),
                        _range.Comparer))));
 }
Пример #2
0
 /// <summary>
 ///     Returns a readonly ordered dictionary that includes everything before the value.
 ///     Whether the value is included in the range depends on whether the isInclusive
 ///     flag is set.
 /// </summary>
 /// <param name="value">The end value.</param>
 /// <param name="isInclusive">if set to <c>true</c> [is inclusive].</param>
 /// <returns></returns>
 public IOrderedDictionary <TK, TV> Head(
     TK value,
     bool isInclusive = false)
 {
     return(new OrderedListDictionaryView <TK, TV>(
                _parent,
                _range.Merge(
                    new BoundRange <TK>(
                        null,
                        new Bound <TK>(value, isInclusive),
                        KeyComparer))));
 }