public MainWindowViewModel(IConversionEngine conversionEngine, IUnitsRepository unitsRepository) { unitsListFrom = new ObservableCollection <Unit>(); unitsListTo = new ObservableCollection <Unit>(); ConvertCommand = new RelayCommand(o => { var _2 = ConvertNumber(o); }, CanConvertNumber); this.conversionEngine = conversionEngine; this.unitsRepository = unitsRepository; var _ = LoadList(unitsRepository.InputUnitsCollection(), UnitsListFrom); this.PropertyChanged += OnPropertyChanged; }