Example #1
0
 /// <summary>
 /// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
 /// </summary>
 public ImmutableSortedDictionary <TKey, TValue> Clear()
 {
     Contract.Ensures(Contract.Result <ImmutableSortedDictionary <TKey, TValue> >() != null);
     Contract.Ensures(Contract.Result <ImmutableSortedDictionary <TKey, TValue> >().IsEmpty);
     Contract.Ensures(Contract.Result <ImmutableSortedDictionary <TKey, TValue> >().KeyComparer == ((ISortKeyCollection <TKey>) this).KeyComparer);
     return(_root.IsEmpty ? this : Empty.WithComparers(_keyComparer, _valueComparer));
 }
Example #2
0
 /// <summary>
 /// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
 /// </summary>
 public ImmutableSortedDictionary <TKey, TValue> Clear()
 {
     return(_root.IsEmpty ? this : Empty.WithComparers(_keyComparer, _valueComparer));
 }