public ObservableCollection <T> GetTheList(ICProp <CT, T> component)
        {
            if (IsReadOnly)
            {
                //throw new InvalidOperationException("This list is readonly.");
            }

            if (_theList == null)
            {
                //if (UseObservable)
                //{
                //    _theList = ObservableCollectionGetter(component);
                //}
                //else
                //{
                //    _theList = new ObservableCollection<T>(IEnumerableGetter(component));
                //}
                _theList = new ObservableCollection <T>(IEnumerableGetter(component));
            }
            return(_theList);
        }
 public ReadOnlyObservableCollection <T> GetTheReadOnlyList(ICProp <CT, T> component)
 {
     if (_theReadOnlyList == null)
     {
         if (!IsReadOnly)
         {
             // Provide a read-only wrapper around the ObservableCollection.
             _theReadOnlyList = new ReadOnlyObservableCollection <T>(GetTheList(component));
         }
         else
         {
             //if (UseObservable)
             //{
             //    _theReadOnlyList = ReadOnlyObservableCollectionGetter(component);
             //}
             //else
             //{
             //    _theReadOnlyList = (IReadOnlyObsCollection<T>) new ReadOnlyObservableCollection<T>(new ObservableCollection<T>(IEnumerableGetter(component)));
             //}
             _theReadOnlyList = new ReadOnlyObservableCollection <T>(new ObservableCollection <T>(IEnumerableGetter(component)));
         }
     }
     return(_theReadOnlyList);
 }