Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/09/10 03:22:58 (14 years ago)
Author:
swagner
Message:

Worked on HeuristicLab.Collections (#819)

  • removed implementation of IDisposable
  • added read-only wrappers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Collections/3.3/ObservableDictionary.cs

    r2575 r2618  
    9191    #endregion
    9292
    93     #region Destructors
    94     ~ObservableDictionary() {
    95       Dispose(false);
    96     }
    97     protected virtual void Dispose(bool disposing) {
    98       if (disposing) {
    99         Clear();
    100       }
    101     }
    102     public void Dispose() {
    103       Dispose(true);
    104       GC.SuppressFinalize(this);
    105     }
    106     #endregion
    107 
    10893    #region Access
    10994    public bool ContainsKey(TKey key) {
     
    157142
    158143    #region Conversion
     144    public ReadOnlyObservableDictionary<TKey, TValue> AsReadOnly() {
     145      return new ReadOnlyObservableDictionary<TKey, TValue>(this);
     146    }
    159147    void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) {
    160148      ((ICollection<KeyValuePair<TKey, TValue>>)dict).CopyTo(array, arrayIndex);
Note: See TracChangeset for help on using the changeset viewer.