コード例 #1
0
 public StopSelectionViewModel(IUnitOfWork unitOfWork, AppUse appUse, INavigationService navigationService)
     : base(appUse, ApplicationPage.StopSelection, unitOfWork, navigationService)
 {
     this.timerSearch = new DispatcherTimer();
     this.timerSearch.Interval = new TimeSpan(0, 0, 1);
     this.timerSearch.Tick += TimerTickSearch;
 }
コード例 #2
0
        public async Task AddUsageAsync(
            string user,
            string company,
            Type callerType,
            string memberName)
        {
            var customer = await this.context.CustomerUsers.FirstOrDefaultAsync(u => u.UserName == user);

            if (customer == null)
            {
                return;
            }

            var usage = new AppUse
            {
                Id             = Guid.NewGuid(),
                CustomerUserId = customer.Id,
                Company        = company,
                Operation      = $"{callerType.FullName}:{memberName}",
                Timestamp      = DateTimeOffset.UtcNow
            };

            await this.context.Usages.AddAsync(usage);

            await this.context.SaveChangesAsync();
        }
コード例 #3
0
 public StationsNearbyViewModel(IUnitOfWork unitOfWork, AppUse appUse, INavigationService navigationService)
     : base(appUse, ApplicationPage.Settings, unitOfWork, navigationService)
 {
     this.timerSearch          = new DispatcherTimer();
     this.timerSearch.Interval = new TimeSpan(0, 0, 1);
     this.timerSearch.Tick    += TimerTickSearch;
 }
コード例 #4
0
        public PlaceOfInterestViewModel(IUnitOfWork unitOfWork, IBumbleApiService BumbleApiService, AppUse appUse, INavigationService navigationService)
            : base(appUse, ApplicationPage.ExploreCity, unitOfWork, navigationService)
        {
            this.timerSearch = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick += TimerTickSearch;

            this.BumbleApiService = BumbleApiService;
        }
コード例 #5
0
        public PlaceOfInterestViewModel(IUnitOfWork unitOfWork, IBumbleApiService BumbleApiService, AppUse appUse, INavigationService navigationService)
            : base(appUse, ApplicationPage.ExploreCity, unitOfWork, navigationService)
        {
            this.timerSearch          = new DispatcherTimer();
            this.timerSearch.Interval = new TimeSpan(0, 0, 1);
            this.timerSearch.Tick    += TimerTickSearch;

            this.BumbleApiService = BumbleApiService;
        }
コード例 #6
0
 public PlaceOfInterestCategoriesViewModel(IUnitOfWork unitOfWork, AppUse appUse, INavigationService navigationService)
     : base(appUse, ApplicationPage.FilterPoiCategories, unitOfWork, navigationService)
 {
 }