public ObservableCollection<StockWrapper> CreateCollection(IOStockType type)
 {
     if (type == IOStockType.NONE)
         throw new ArgumentOutOfRangeException();
     if (type == IOStockType.ALL)
         return new ObservableCollection<StockWrapper>(_list);
     else
         return new ObservableCollection<StockWrapper>(_list.Where(x => x.StockType == type));
 }
 public int Count(IOStockType type = IOStockType.ALL)
 {
     if (type == IOStockType.NONE)
         throw new ArgumentException();
     if (IOStockType.ALL == type)
         return _list.Count;
     else
         return _list.Where(x => x.StockType == type).Count();
 }