public MenuMainVM(NavigationHelper _navigation) { repositoryServices = new RepositoryServices(); navigationHelper = _navigation; getDataFromServiceCommand = new RelayCommand <object>(getDataFromService); getDataFromServiceCommand.Execute(null); }
public static void Register(IServiceCollection services) { RepositoryServices.Register(services); MapperServices.Register(services); ApplicationServices.Register(services); IdentityConfiguration.Register(services); }
/// <summary> /// Initializes the singleton Application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { InitializeComponent(); Suspending += OnSuspending; MobileServices = new MobileServices(); RepositoryServices = new RepositoryServices(); }
public RepositoryEditorViewModel() { Mediator.Subscribe <EditRepositoryEvent>(repo => { AcceptText = "Commit"; Repository = repo as Repository; _isNewRepo = false; if (Repository != null) { Repository.BlockUpdates = true; } _repoBeforeEdit = Repository != null ? new Repository() { Password = Repository.Password, Name = Repository.Name, Path = Repository.Path, Type = Repository.Type, UserName = Repository.UserName } : null; // Make sure to get the details view in place for this repo type if (Repository != null) { Mediator.NotifyColleaguesAsync <RepositoryTypeSelectedInEditEvent>(this.Repository.Type); } }); Mediator.Subscribe <AddRepositoryEvent>(repo => { AcceptText = "Add"; Repository = new Repository(); _isNewRepo = true; }); // When a user selects a different repo type from the combobox, we update the repository object with that type, // then publish that new type so the corresponding dataservice can provide a details view for that type RepositoryServices = CollectionViewSource.GetDefaultView(DataServiceLocator.GetSharedServices()); RepositoryServices.CurrentChanged += (s, e) => { var current = RepositoryServices.CurrentItem as ISourceControlDataService; if (current != null) { this.Repository.Type = current.RepositoryType; Mediator.NotifyColleaguesAsync <RepositoryTypeSelectedInEditEvent>((RepositoryServices.CurrentItem as ISourceControlDataService).RepositoryType); } }; // this is the response from the data service providing a custom details view for the seleted repo type Mediator.Subscribe <ShowRepositoryDetailsInEditorEvent>(repoDetailsView => { RepositoryDetailsView = repoDetailsView; var match = (from r in RepositoryServices.Cast <ISourceControlDataService>() where r.RepositoryType == Repository.Type select r).FirstOrDefault(); RepositoryServices.MoveCurrentTo(match); }); }
public ScrapeStoreController() { ScraperServices = new ScraperServices(); RepositoryServices = new RepositoryServices(); }