Exemple #1
0
 private void Dispatch(TradesModel model)
 {
     this.TradesModel = model;
     Items.Clear();
     foreach (var trade in model.Items.Take(500))
     {
         var vm = TradesEntryViewModel.FromModel(Exchange, trade);
         Items.Add(vm);
     }
 }
Exemple #2
0
        public static TradesEntryViewModel FromModel(ExchangeBase exchangeBase, TradesEntryModel model)
        {
            var vm = new TradesEntryViewModel(exchangeBase)
            {
                Price     = model.Price,
                Amount    = model.Amount,
                Side      = model.Side,
                Timestamp = model.Timestamp,
                Info      = model.Info,
                Type      = model.Type
            };

            return(vm);
        }