public ViewModel() { _instrumentRepository = new MyInstrumentRepository(); _instrumentRepository.Init(50); Instruments = new ObservableCollection <InstrumentViewModel>( _instrumentRepository.GetInstruments().Select(instrument => new InstrumentViewModel(instrument))); _pricer = new Pricer(_instrumentRepository, 1); StartCommand = new RelayCommand(o => { _pricer.Price(); }, o => true); StopCommand = new RelayCommand(o => { _pricer.StopPrice(); }, o => true); RestartCommand = new RelayCommand(o => { _pricer.Restart(); }, o => true); }