/// <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)); }
/// <summary> /// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface. /// </summary> public ImmutableSortedDictionary <TKey, TValue> Clear() { return(_root.IsEmpty ? this : Empty.WithComparers(_keyComparer, _valueComparer)); }