public override void ViewDidLoad() { base.ViewDidLoad(); // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif using (var scope = AppDelegate.Container.BeginLifetimeScope()) { categoriesUseCase = scope.Resolve <GetCategoriesUseCase>(); salesUseCase = scope.Resolve <GetSalesUseCase>(); productUseCase = scope.Resolve <GetProductsUseCase>(); favoriteProductsUseCase = scope.Resolve <FavoriteProductsUseCase>(); } catalogTableView.RegisterNibForCellReuse(CatalogCell.Nib, "catalogCellId"); catalogTableView.RowHeight = UITableView.AutomaticDimension; catalogTableView.EstimatedRowHeight = 40f; spinner.StartAnimating(); catalogTableView.BackgroundView = spinner; catalogTableView.ReloadData(); _favoritesProducts = favoriteProductsUseCase.Get().ToList(); salesUseCase.Get(GetSalesHandler, ExceptionHandler); miniCartView.Hidden = true; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_main); using (var scope = App.Container.BeginLifetimeScope()) { categoriesUseCase = scope.Resolve <GetCategoriesUseCase>(); salesUseCase = scope.Resolve <GetSalesUseCase>(); productUseCase = scope.Resolve <GetProductsUseCase>(); favoriteProductsUseCase = scope.Resolve <FavoriteProductsUseCase>(); } salesUseCase.Get(GetSalesHandler, ExceptionHandler); }