private WrappingCollection.WithSelection CreateWarehouseItems()
        {
            var wc = new WrappingCollection.WithSelection
            {
                FactoryMethod = o => _viewModelCreatorService.CreateViewModel<IWarehouseItem, WarehouseItemViewModel>((IWarehouseItem) o)
            }.WithSource(_dataService.WarehouseItems);

            return wc;
        }
Exemplo n.º 2
0
        private WrappingCollection.WithSelection CreateWarehouseItems()
        {
            var wc = new WrappingCollection.WithSelection
            {
                FactoryMethod = o => _viewModelCreatorService.CreateViewModel <IWarehouseItem, WarehouseItemViewModel>(
                    (IWarehouseItem)o)
            }.WithSource(_dataService.WarehouseItems);

            return(wc);
        }
Exemplo n.º 3
0
        private WrappingCollection.WithSelection CreateItems()
        {
            WrappingCollection.WithSelection wc = null;

            // ReSharper disable once AccessToModifiedClosure
            wc = new WrappingCollection.WithSelection(o => wc?.SelectedItem == null)
            {
                FactoryMethod = o =>
                                _viewModelCreatorService.CreateViewModel <ISampleItem, SampleItemViewModel>((ISampleItem)o)
            }.WithSource(_dataService.Items);

            return(wc);
        }