public TripSelectionViewModel(IAggregateService aggregateService, IUberService uberService)
     : base(ApplicationPage.TripSelection, aggregateService)
 {
     this.uberService = uberService;
     this.timer       = new DispatcherTimer();
     this.timer.Tick += TimerTick;
 }
示例#2
0
        public ModesViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.Modes, aggregateService)
        {
            operators = UnitOfWork.PublicTransportOperatorRepository.GetAll().ToList();

            UpdateCheckBoxes();
        }
示例#3
0
 public DataImporter(IEntityFinder entityFinder
                     , IAttributeFinder attributeFinder
                     , IOptionSetDetailFinder optionSetDetailFinder
                     , IStringMapFinder stringMapFinder
                     , IWebHelper webHelper
                     , IDataCreater dataCreater
                     , IDataUpdater dataUpdater
                     , IDataFinder dataFinder
                     , IAggregateService aggregateService
                     , IImportFileService importFileService
                     , IImportDataService importDataService
                     , IImportMapService importMapService)
 {
     _entityFinder    = entityFinder;
     _attributeFinder = attributeFinder;
     _optionSetDetailServiceFinder = optionSetDetailFinder;
     _stringMapFinder   = stringMapFinder;
     _webHelper         = webHelper;
     _dataCreater       = dataCreater;
     _dataUpdater       = dataUpdater;
     _dataFinder        = dataFinder;
     _aggregateService  = aggregateService;
     _importFileService = importFileService;
     _importDataService = importDataService;
     _importMapService  = importMapService;
 }
 public TripSelectionViewModel(IAggregateService aggregateService, IUberService uberService)
     : base(ApplicationPage.TripSelection, aggregateService)
 {
     this.uberService = uberService;
     this.timer = new DispatcherTimer();
     this.timer.Tick += TimerTick;
 }
示例#5
0
 public DataDeleter(
     IAppContext appContext
     , IEntityFinder entityFinder
     , IRoleObjectAccessEntityPermissionService roleObjectAccessEntityPermissionService
     , IPrincipalObjectAccessService principalObjectAccessService
     , IEventPublisher eventPublisher
     , IBusinessUnitService businessUnitService
     , IOrganizationDataProvider organizationDataProvider
     , IOrganizationDataRetriever organizationDataRetriever
     , IAttributeFinder attributeFinder
     , IEntityPluginExecutor entityPluginExecutor
     , IRelationShipFinder relationShipFinder
     , IMapUpdater mapUpdater
     , IFormulaUpdater formulaUpdater
     , IAggregateService aggregateService
     )
     : base(appContext, entityFinder, roleObjectAccessEntityPermissionService, principalObjectAccessService, eventPublisher, businessUnitService)
 {
     _organizationDataProvider  = organizationDataProvider;
     _organizationDataRetriever = organizationDataRetriever;
     _attributeFinder           = attributeFinder;
     _entityPluginExecutor      = entityPluginExecutor;
     _relationShipFinder        = relationShipFinder;
     _mapUpdater       = mapUpdater;
     _formulaUpdater   = formulaUpdater;
     _aggregateService = aggregateService;
 }
示例#6
0
        public ModesViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.Modes, aggregateService)
        {
            operators = UnitOfWork.PublicTransportOperatorRepository.GetAll().ToList();

            UpdateCheckBoxes();
        }
        public HeaderViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.Header, aggregateService)
        {
            Messenger.Default.Register <LoadingBarMessage>(this, (action) => SetLoadingBarState(action));

            Messenger.Default.Register <PageTitleMessage>(this, (action) => SetPageTitle(action));
        }
        public UberAuthenticationViewModel(IAggregateService aggregateService, IUberService uberService)
            : base(ApplicationPage.UberAuthentication, aggregateService)
        {
            this.uberService = uberService;

            this.credentials = new UberOAuthCredentials("-PNH94q8gmuRmb5ZvnEVYO0P-ysj_8-_", "1h-6l1ZVRciE0suS9E5LRjbXvoXg-Q6d3lZfaFxX", UberOAuthGrantType.authorization_code);
        }
示例#9
0
        public UberAuthenticationViewModel(IAggregateService aggregateService, IUberService uberService)
            : base(ApplicationPage.UberAuthentication, aggregateService)
        {
            this.uberService = uberService;

            this.credentials = new UberOAuthCredentials("-PNH94q8gmuRmb5ZvnEVYO0P-ysj_8-_", "1h-6l1ZVRciE0suS9E5LRjbXvoXg-Q6d3lZfaFxX", UberOAuthGrantType.authorization_code);
        }
示例#10
0
 public HomeController(IAggregateService aggregateService, ITransientService transientService, IScopedService scopedService, IInstanceService instanceService, ISingletonService singletonService)
 {
     AggregateService = aggregateService;
     TransientService = transientService;
     ScopedService    = scopedService;
     SingletonService = singletonService;
     InstanceService  = instanceService;
 }
        public UberTripDetailsViewModel(IAggregateService aggregateService, IUberService uberService)
            : base(ApplicationPage.UberTripDetails, aggregateService)
        {
            this.uberService = uberService;

            this.timer = new DispatcherTimer();
            this.timer.Tick += TimerTick;
        }
示例#12
0
 public CreateDepositCommandHandler(IAggregateService <DepositAggregate> depositAggregateService,
                                    IAggregateService <AccountAggregate> accountAggregateService,
                                    IEventPublisher eventPublisher) :
     base(eventPublisher)
 {
     _depositAggregateService = depositAggregateService;
     _accountAggregateService = accountAggregateService;
 }
        public MessageUsViewModel(IAggregateService aggregateService, IDrumbleApiService DrumbleApi)
            : base(ApplicationPage.MessageUs, aggregateService)
        {
            if (DrumbleApi == null)
                throw new ArgumentNullException("DrumbleApi");

            this.DrumbleApi = DrumbleApi;
        }
示例#14
0
        public UberTripDetailsViewModel(IAggregateService aggregateService, IUberService uberService)
            : base(ApplicationPage.UberTripDetails, aggregateService)
        {
            this.uberService = uberService;

            this.timer       = new DispatcherTimer();
            this.timer.Tick += TimerTick;
        }
示例#15
0
        public SearchViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService)
            : base(ApplicationPage.Search, aggregateService)
        {
            this.timerSearch          = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick    += TimerTickSearch;

            this.BumbleApiService = BumbleApiService;
        }
示例#16
0
        public SearchViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService)
            : base(ApplicationPage.Search, aggregateService)
        {
            this.timerSearch = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick += TimerTickSearch;

            this.BumbleApiService = BumbleApiService;
        }
示例#17
0
        public static long Count(this IAggregateService aggregateService, string entityName, FilterExpression filter)
        {
            var value = GetValue(aggregateService, entityName, filter, AggregateType.Count);

            if (value != null)
            {
                return(long.Parse(value.ToString()));
            }
            return(0);
        }
示例#18
0
 public DataAggregateController(IWebAppContext appContext
                                , IAggregateService aggregateService
                                , IQueryViewFinder queryViewFinder
                                , IAttributeFinder attributeFinder)
     : base(appContext)
 {
     _aggregateService = aggregateService;
     _queryViewFinder  = queryViewFinder;
     _attributeFinder  = attributeFinder;
 }
示例#19
0
        public TripDetailsViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApi)
            : base(ApplicationPage.TripDetails, aggregateService)
        {
            this.BumbleApi = BumbleApi;

            this.timer       = new DispatcherTimer();
            this.timer.Tick += TimerTick;

            Messenger.Default.Register <PageLoadMessage>(this, (action) => SendTripMessage(action));
        }
示例#20
0
        public static double Min(this IAggregateService aggregateService, string entityName, FilterExpression filter)
        {
            var value = GetValue(aggregateService, entityName, filter, AggregateType.Min);

            if (value != null)
            {
                return(double.Parse(value.ToString()));
            }
            return(0);
        }
        public AuthoriseViewModel(IAggregateService aggregateService, IDrumbleApiService DrumbleApi)
            : base(ApplicationPage.Authorise, aggregateService)
        {
            if (DrumbleApi == null)
            {
                throw new ArgumentNullException("DrumbleApi");
            }

            this.DrumbleApi = DrumbleApi;
        }
示例#22
0
        public LoginViewModel(IAggregateService aggregateService, IDrumbleApiService DrumbleApi)
            : base(ApplicationPage.Login, aggregateService)
        {
            if (DrumbleApi == null)
                throw new ArgumentNullException("DrumbleApi");

            this.DrumbleApi = DrumbleApi;

            Messenger.Default.Register<LoginMessage>(this, (action) => PageState(action));
        }
        public TripDetailsViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApi)
            : base(ApplicationPage.TripDetails, aggregateService)
        {
            this.BumbleApi = BumbleApi;

            this.timer = new DispatcherTimer();
            this.timer.Tick += TimerTick;

            Messenger.Default.Register<PageLoadMessage>(this, (action) => SendTripMessage(action));
        }
示例#24
0
        protected AnalyticsBase(ApplicationPage appPage, IAggregateService aggregateService)
        {
            if (aggregateService == null)
                throw new ArgumentNullException("aggregateService");

            this.AggregateService = aggregateService; 
            this.appPage = appPage;
            if (appPage != ApplicationPage.SplashScreen)
                this.weather = UnitOfWork.WeatherRepository.Get();
        }
        public SplashScreenViewModel(IAggregateService aggregateService, IDrumbleApiService DrumbleApiService, IBumbleApiService BumbleApiService)
            : base(ApplicationPage.SplashScreen, aggregateService)
        {
            this.DrumbleApiService = DrumbleApiService;
            this.BumbleApiService  = BumbleApiService;

            Messenger.Default.Register <SplashScreenMessage>(this, (action) => SetPageState(action));

            // Seed database.
            databaseCreated = DatabaseSetup.Seed(aggregateService.UnitOfWork);
        }
示例#26
0
        public LoginViewModel(IAggregateService aggregateService, IDrumbleApiService DrumbleApi)
            : base(ApplicationPage.Login, aggregateService)
        {
            if (DrumbleApi == null)
            {
                throw new ArgumentNullException("DrumbleApi");
            }

            this.DrumbleApi = DrumbleApi;

            Messenger.Default.Register <LoginMessage>(this, (action) => PageState(action));
        }
示例#27
0
        public FavouritesViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.Favourites, aggregateService)
        {
            this.timerSearch          = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick    += TimerTickSearch;

            Messenger.Default.Register <FavouriteMessage>(this, (action) => SetFavourite(action));
            Messenger.Default.Register <RecentTripMessage>(this, (action) => SetRecentTrip(action));

            Messenger.Default.Register <FavouritesPageState>(this, (action) => PageState(action));
        }
        public FavouritesViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.Favourites, aggregateService)
        {
            this.timerSearch = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick += TimerTickSearch;

            Messenger.Default.Register<FavouriteMessage>(this, (action) => SetFavourite(action));
            Messenger.Default.Register<RecentTripMessage>(this, (action) => SetRecentTrip(action));

            Messenger.Default.Register<FavouritesPageState>(this, (action) => PageState(action));
        }
示例#29
0
        protected AnalyticsBase(ApplicationPage appPage, IAggregateService aggregateService)
        {
            if (aggregateService == null)
            {
                throw new ArgumentNullException("aggregateService");
            }

            this.AggregateService = aggregateService;
            this.appPage          = appPage;
            if (appPage != ApplicationPage.SplashScreen)
            {
                this.weather = UnitOfWork.WeatherRepository.Get();
            }
        }
示例#30
0
        public StationsAndPlacesOfInterestViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService)
            : base(ApplicationPage.Settings, aggregateService)
        {
            this.timerSearch          = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick    += TimerTickSearch;

            this.timerMapMoved          = new DispatcherTimer();
            this.timerMapMoved.Interval = new TimeSpan(0, 0, 1);
            this.timerMapMoved.Tick    += TimerTickMapMoved;

            this.BumbleApiService = BumbleApiService;

            Messenger.Default.Register <StationsAndPlacesOfInterestModeMessage>(this, (action) => SetSelectionMode(action));
        }
        public StationsAndPlacesOfInterestViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService)
            : base(ApplicationPage.Settings, aggregateService)
        {
            this.timerSearch = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick += TimerTickSearch;

            this.timerMapMoved = new DispatcherTimer();
            this.timerMapMoved.Interval = new TimeSpan(0, 0, 1);
            this.timerMapMoved.Tick += TimerTickMapMoved;

            this.BumbleApiService = BumbleApiService;

            Messenger.Default.Register<StationsAndPlacesOfInterestModeMessage>(this, (action) => SetSelectionMode(action));
        }
 public DataFetchAndAggregateController(IWebAppContext appContext
                                        , IQueryViewFinder queryViewService
                                        , IRelationShipFinder relationShipFinder
                                        , IRoleObjectAccessService roleObjectAccessService
                                        , IFetchDataService fetchDataService
                                        , IAggregateService aggregateService
                                        , IAttributeFinder attributeFinder)
     : base(appContext)
 {
     _queryViewFinder         = queryViewService;
     _relationShipFinder      = relationShipFinder;
     _fetchService            = fetchDataService;
     _roleObjectAccessService = roleObjectAccessService;
     _aggregateService        = aggregateService;
     _attributeFinder         = attributeFinder;
 }
示例#33
0
 public KanbanViewController(IWebAppContext appContext
                             , IEntityFinder entityFinder
                             , IAttributeFinder attributeFinder
                             , IQueryViewFinder queryViewFinder
                             , IOptionSetFinder optionSetFinder
                             , IRoleObjectAccessService roleObjectAccessService
                             , IAggregateService aggregateService)
     : base(appContext)
 {
     _entityFinder            = entityFinder;
     _attributeFinder         = attributeFinder;
     _queryViewFinder         = queryViewFinder;
     _optionSetFinder         = optionSetFinder;
     _roleObjectAccessService = roleObjectAccessService;
     _aggregateService        = aggregateService;
 }
示例#34
0
 public GridViewController(IWebAppContext appContext
                           , IQueryViewFinder queryViewFinder
                           , IRibbonButtonFinder ribbonbuttonFinder
                           , IGridService gridService
                           , IRoleObjectAccessService roleObjectAccessService
                           , IFetchDataService fetchDataService
                           , IAggregateService aggregateService
                           , IRelationShipFinder relationShipFinder)
     : base(appContext)
 {
     _gridService             = gridService;
     _fetchDataService        = fetchDataService;
     _queryViewFinder         = queryViewFinder;
     _ribbonbuttonFinder      = ribbonbuttonFinder;
     _roleObjectAccessService = roleObjectAccessService;
     _aggregateService        = aggregateService;
     _relationShipFinder      = relationShipFinder;
 }
示例#35
0
 public DataExporter(IAppContext appContext
                     , ISystemUserPermissionService systemUserPermissionService
                     , IFetchDataService fetchDataService
                     , IAggregateService aggregateService
                     , IAttributeFinder attributeFinder
                     , IRelationShipFinder relationShipFinder
                     , IGridService gridService
                     , IWebHelper webHelper
                     )
 {
     _appContext = appContext;
     _systemUserPermissionService = systemUserPermissionService;
     _fetchDataService            = fetchDataService;
     _aggregateService            = aggregateService;
     _attributeFinder             = attributeFinder;
     _relationShipFinder          = relationShipFinder;
     _gridService = gridService;
     _webHelper   = webHelper;
 }
示例#36
0
        public WhereToViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService, IUberService uberService)
            : base(ApplicationPage.WhereTo, aggregateService)
        {
            this.user             = UnitOfWork.UserRepository.GetUser();
            this.BumbleApiService = BumbleApiService;
            this.uberService      = uberService;

            AppCommandMessage.Send(Messages.Enums.AppCommandMessageReason.RemoveBackEntries);

            Messenger.Default.Register <RecentTripMessage>(this, (action) => SetRecentTrip(action));
            Messenger.Default.Register <FavouriteMessage>(this, (action) => SetFavourite(action));
            Messenger.Default.Register <WhereToMessage>(this, (action) => SetWhereTo(action));

            this.LocationSearchBoxModel    = new SearchBoxModel(UnitOfWork, InMemoryApplicationSettingModel, this, SearchType.Location, BumbleApiService, user, NavigationService);
            this.DestinationSearchBoxModel = new SearchBoxModel(UnitOfWork, InMemoryApplicationSettingModel, this, SearchType.Destination, BumbleApiService, user, NavigationService);

            this.LocationSearchBoxModel.Changed    += LocationSearchBoxModel_Changed;
            this.DestinationSearchBoxModel.Changed += LocationSearchBoxModel_Changed;

            this.LocationSearchBoxModel.SetAutoPopulateState();
        }
示例#37
0
        public WhereToViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService, IUberService uberService)
            : base(ApplicationPage.WhereTo, aggregateService)
        {
            this.user = UnitOfWork.UserRepository.GetUser();
            this.BumbleApiService = BumbleApiService;
            this.uberService = uberService;

            AppCommandMessage.Send(Messages.Enums.AppCommandMessageReason.RemoveBackEntries);

            Messenger.Default.Register<RecentTripMessage>(this, (action) => SetRecentTrip(action));
            Messenger.Default.Register<FavouriteMessage>(this, (action) => SetFavourite(action));
            Messenger.Default.Register<WhereToMessage>(this, (action) => SetWhereTo(action));

            this.LocationSearchBoxModel = new SearchBoxModel(UnitOfWork, InMemoryApplicationSettingModel, this, SearchType.Location, BumbleApiService, user, NavigationService);
            this.DestinationSearchBoxModel = new SearchBoxModel(UnitOfWork, InMemoryApplicationSettingModel, this, SearchType.Destination, BumbleApiService, user, NavigationService);

            this.LocationSearchBoxModel.Changed += LocationSearchBoxModel_Changed;
            this.DestinationSearchBoxModel.Changed += LocationSearchBoxModel_Changed;

            this.LocationSearchBoxModel.SetAutoPopulateState();
        }
示例#38
0
        public static object GetValue(this IAggregateService aggregateService, string entityName, FilterExpression filter, AggregateType aggregateType)
        {
            var agg = new AggregateExpression
            {
                EntityName = entityName
                ,
                AggregateFields = new List <AggregateExpressionField> {
                    new AggregateExpressionField {
                        AttributeName = entityName + "Id", AggregateType = aggregateType
                    }
                }
                ,
                Criteria = filter
            };

            agg.AddColumns(entityName + "Id");
            var values = aggregateService.Execute(agg);

            if (values.NotEmpty())
            {
                return((values[0] as IDictionary <string, object>).Values.First());
            }
            return(null);
        }
示例#39
0
 public AboutViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.About, aggregateService)
 {
 }
示例#40
0
 public Consumer(IAggregateService aggregateService)
 {
     _aggregateService = aggregateService ?? throw new ArgumentNullException(nameof(aggregateService));
 }
 public AnnouncementsViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApi)
     : base(ApplicationPage.Announcements, aggregateService)
 {
     this.BumbleApi = BumbleApi;
 }
示例#42
0
 public AboutViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.About, aggregateService)
 {
 }
        public TripOptionViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.TripOptions, aggregateService)
        {

        }
示例#44
0
 public MapsViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.Maps, aggregateService)
 {
 
 }
示例#45
0
 public SettingsViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.Settings, aggregateService)
 {
 }
 public Consumer(IAggregateService services)
 {
     this.allservices = services ?? throw new ArgumentNullException(nameof(services));
 }
 public DateTimeSelectionViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.DateTimeSelection, aggregateService)
 {
     Messenger.Default.Register<DepartureTimeSelectionMessage>(this, (action) => SetSelectionMode(action));
 }
 public SettingsViewModel(IAggregateService aggregateService)
     : base(ApplicationPage.Settings, aggregateService)
 {
 }
 public MapPointSelectionViewModel(IAggregateService aggregateService, IBumbleApiService BumbleApiService)
     : base(ApplicationPage.MapPointSelection, aggregateService)
 {
     this.BumbleApiService = BumbleApiService;
 }
        public MainMenuViewModel(IAggregateService aggregateService)
            : base(ApplicationPage.MainMenu, aggregateService)
        {

        }