Task INotificationHandler <OnShowDialogCommand <EditProductComponentViewModel> > .Handle(OnShowDialogCommand <EditProductComponentViewModel> notification, CancellationToken cancellationToken) { notification.OnInvokeAction.Invoke((editProductComponentViewModel, OnStateHasChanged) => { editProductComponentViewModel.IsDisplay = true; OnStateHasChanged.Invoke(); }); return(Task.CompletedTask); }
Task INotificationHandler <OnShowDialogCommand <AddProductComponentViewModel> > .Handle(OnShowDialogCommand <AddProductComponentViewModel> notification, CancellationToken cancellationToken) { notification.OnInvokeAction.Invoke((addProductViewModel, OnStateHasChanged) => { addProductViewModel.IsDisplay = true; addProductViewModel.Product = addProductViewModel.Product ?? new ProductModel(); OnStateHasChanged?.Invoke(); }); return(Task.CompletedTask); }