public ProductsListTabVM(ProductsCache productsCache) { UpdateTitle("Products List"); _cache = productsCache; UpdateListCmd = R2Command.Async(UpdateList, _ => !IsBusy, "Update List"); _cache.StatusChanged += (s, e) => SetStatus(e); this.StatusChanged += (s, e) => AsUI(_ => Logs.Add(e)); UpdateListCmd.ExecuteIfItCan(); }
public void SetProducts(IEnumerable <_Product> Products) => _productsCache = new ProductsCache(Products);
public ProductHandler(ProductsCache cache) { this.cache = cache; }
//construtor para injeção de dependência public ProductController(IMediator mediator, ProductsCache cache) { this.mediator = mediator; this.cache = cache; }
public BarcodeScanningTabVM(ProductsListTabVM productsListTabVM, ProductsCache productsCache) { UpdateTitle("Barcode Scanning"); _skus = productsCache; }