Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/20/10 03:00:00 (14 years ago)
Author:
swagner
Message:

Removed property ReadOnlyView (#969)

File:
1 edited

Legend:

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

    r3390 r3431  
    5252    }
    5353
    54     [Storable]
    55     private bool readOnlyView;
    56     public virtual bool ReadOnlyView {
    57       get { return readOnlyView; }
    58       set {
    59         if ((readOnlyView != value) && !((ICollection<T>)list).IsReadOnly) {
    60           readOnlyView = value;
    61           OnReadOnlyViewChanged();
    62           OnPropertyChanged("ReadOnlyView");
    63         }
    64       }
    65     }
    66 
    67     public ItemList()
    68       : base() {
    69       readOnlyView = ((ICollection<T>)list).IsReadOnly;
    70     }
    71     public ItemList(int capacity)
    72       : base(capacity) {
    73       readOnlyView = ((ICollection<T>)list).IsReadOnly;
    74     }
    75     public ItemList(IEnumerable<T> collection)
    76       : base(collection) {
    77       readOnlyView = ((ICollection<T>)list).IsReadOnly;
    78     }
     54    public ItemList() : base() { }
     55    public ItemList(int capacity) : base(capacity) { }
     56    public ItemList(IEnumerable<T> collection) : base(collection) { }
    7957    [StorableConstructor]
    8058    protected ItemList(bool deserializing) { }
     
    8664      ItemList<T> clone = (ItemList<T>)Activator.CreateInstance(this.GetType());
    8765      cloner.RegisterClonedObject(this, clone);
    88       clone.readOnlyView = readOnlyView;
    8966      clone.list = new List<T>(this.Select(x => (T)cloner.Clone(x)));
    9067      return clone;
     
    10986      if (handler != null) handler(this, EventArgs.Empty);
    11087    }
    111     public event EventHandler ReadOnlyViewChanged;
    112     protected virtual void OnReadOnlyViewChanged() {
    113       EventHandler handler = ReadOnlyViewChanged;
    114       if (handler != null) handler(this, EventArgs.Empty);
    115     }
    11688  }
    11789}
Note: See TracChangeset for help on using the changeset viewer.