public CategoryNavigationViewModel() { if (_catalogService == null) { _catalogService = LocatorViewModel.Resolve <ICatalogService>(); } }
public RegisterViewModel() { if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } }
public App() { InitializeComponent(); //check if device is connected to internet //https://docs.microsoft.com/en-us/xamarin/essentials/connectivity?context=xamarin%2Fxamarin-forms&tabs=ios var current = Connectivity.NetworkAccess; if (current != NetworkAccess.Internet) { MainPage = new NoInternetPage(); return; } if (_localizationService == null) { _localizationService = LocatorViewModel.Resolve <ILocalizationService>(); } if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } CurrentCostumerSettings = new CustomerSettingModel(); _customerService.SetCurrentCustomer(true, true); _localizationService.CreateOrUpdateLocales(); InitApp(); }
public HomeBaseViewModel() { if (_catalogService == null) { _catalogService = LocatorViewModel.Resolve <ICatalogService>(); } }
public AppNavigationBaseViewModel() { if (_customerService == null && App.CurrentCostumer == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } }
public LoginViewModel() { if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } if (_topicService == null) { _topicService = LocatorViewModel.Resolve <ITopicService>(); } }
public CustomerViewModel() { if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } if (_catalogService == null) { _catalogService = LocatorViewModel.Resolve <ICatalogService>(); } }
public ItemViewTemplate() { InitializeComponent(); if (_shoppingCartService == null) { _shoppingCartService = LocatorViewModel.Resolve <IShoppingCartService>(); } if (_navigationService == null) { _navigationService = LocatorViewModel.Resolve <INavigationService>(); } }
public SelectListPage() { InitializeComponent(); if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } if (_localizationService == null) { _localizationService = LocatorViewModel.Resolve <ILocalizationService>(); } }
public CustomerView() { InitializeComponent(); View = this; if (BindingContext == null) { BindingContext = new CustomerViewModel(); } if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } }
public ProductViewModel() { if (_productService == null) { _productService = LocatorViewModel.Resolve <IProductService>(); } if (_shoppingCartService == null) { _shoppingCartService = LocatorViewModel.Resolve <IShoppingCartService>(); } if (_customerService == null) { _customerService = LocatorViewModel.Resolve <ICustomerService>(); } }
private static ViewModel CreateViewModel <ViewModel>() where ViewModel : BaseViewModel { return(LocatorViewModel.Resolve <ViewModel>()); }