/// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.DashboardPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        /// <param name="settingsFacade">Settings facade.</param>
        /// <param name="propertyFacade">Property facade.</param>
        /// <param name="storyFacade">Story facade.</param>
        /// <param name="keychainService">Keychain service.</param>
        public DashboardPageViewModel(
            IPageDialogService dialogService,
            IAuthenticationFacade authenticationFacade,
            ISettingsFacade settingsFacade,
            INavigationService navigationService,
            IPropertyFacade propertyFacade,
            IStoryFacade storyFacade,
            IKeychainService keychainService)
            : base(dialogService, authenticationFacade)
        {
            this.keychainService   = keychainService;
            this.settingsFacade    = settingsFacade;
            this.propertyFacade    = propertyFacade;
            this.storyFacade       = storyFacade;
            this.Title             = Constants.PageTitleDashboard;
            this.navigationService = navigationService;

            this.properties    = new ObservableCollection <PropertyViewModel>();
            this.Communities   = new ObservableCollection <StoryViewModel>();
            this.Events        = new ObservableCollection <StoryViewModel>();
            this.ActiveTabData = new ObservableCollection <StoryViewModel>();

            this.ExecuteAsyncTask(async() =>
            {
                await Task.WhenAll(new Task[] {
                    this.LoadProperty(),
                    this.LoadStories("event"),
                    this.LoadStories("story")
                });
            }).Forget();

            PopulateFakeProperties();
        }
 public BlankPageViewModel(INavigationService navigationService,
                           IAuthenticationFacade authenticationFacade,
                           IPageDialogService dialogService,
                           IKeychainService keychainService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.authenticationFacade = authenticationFacade;
     this.navigationService    = navigationService;
     this.keychainService      = keychainService;
 }
Ejemplo n.º 3
0
 public OrderService(CustomerService customerService, ICustomerRepository customerRepository,
                     IOrderRepository orderRepository, ICustomerOrderGroupRepository customerOrderGroupRepository,
                     IAuthenticationFacade authenticationContextFacade)
 {
     _customerService              = customerService;
     _customerRepository           = customerRepository;
     _orderRepository              = orderRepository;
     _customerOrderGroupRepository = customerOrderGroupRepository;
     _authenticationContextFacade  = authenticationContextFacade;
 }
 public AuthenticationController(ISessionApp appSession,
                                 INotificationService notificador,
                                 IMapper mapper,
                                 IAuthenticationFacade authenticationFacade,
                                 IAuthenticationService authenticationService) : base(notificador, appSession)
 {
     _mapper = mapper;
     _authenticationFacade  = authenticationFacade;
     _authenticationService = authenticationService;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyDetailsPageViewModel"/> class.
 /// Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 ///     Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 ///     Initializes a new instance of the
 ///     <see cref="PropertyDetailsPageViewModel"/>
 ///     class.
 /// </summary>
 /// <param name="dialogService">
 /// The dialog service.
 /// </param>
 /// <param name="authenticationFacade">
 /// The authentication facade.
 /// </param>
 /// <param name="propertyFacade">
 /// The property facade.
 /// </param>
 /// <param name="keychainService">
 /// The keychain Service.
 /// </param>
 public PropertyDetailsPageViewModel(
     IPageDialogService dialogService,
     IAuthenticationFacade authenticationFacade,
     IPropertyFacade propertyFacade,
     IKeychainService keychainService,
     INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.propertyFacade  = propertyFacade;
     this.keychainService = keychainService;
 }
Ejemplo n.º 6
0
 public DietaryApplicationTests(TestDb testDb)
 {
     _dbContext                    = testDb.DbContext;
     _customerRepository           = new CustomerRepository(_dbContext);
     _customerOrderGroupRepository = new CustomerOrderGroupRepository(_dbContext);
     _orderRepository              = new OrderRepository(_dbContext);
     _authenticationFacade         = new AuthenticationFacade();
     _customerService              = new CustomerService(_customerRepository);
     _orderService                 = new OrderService(_customerService, _customerRepository, _orderRepository,
                                                      _customerOrderGroupRepository, _authenticationFacade);
 }
 /// <summary>Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.NavigationBaseViewModel"/> class.</summary>
 /// <param name="dialogService">Dialog service.</param>
 /// <param name="authenticationFacade">Authentication facade.</param>
 public NavigationBaseViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade, INavigationService navigationService = null)
     : base(dialogService, authenticationFacade, navigationService)
 {
     if (this.NavigationService != null)
     {
         this.GoBackCommand = new DelegateCommand(() =>
         {
             this.NavigationService.GoBackAsync().Forget();
         });
     }
 }
 /// <summary>Initializes a new instance of the <see cref="ProfilePageViewModel"/> class.</summary>
 /// <param name="dialogService">The dialog service.</param>
 /// <param name="authenticationFacade">The authentication facade.</param>
 /// <param name="accountFacade">The account Facade.</param>
 /// <param name="keychainService">The settings Facade.</param>
 public ProfilePageViewModel(
     IPageDialogService dialogService,
     IAuthenticationFacade authenticationFacade,
     IAccountFacade accountFacade,
     IKeychainService keychainService,
     INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.accountFacade   = accountFacade;
     this.keychainService = keychainService;
 }
 public AccountStatementsPageViewModel(IPageDialogService dialogService,
                                       IAuthenticationFacade authenticationFacade,
                                       IPropertyFacade propertyFacade,
                                       IKeychainService keychainService,
                                       INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
     this.propertyFacade  = propertyFacade;
     this.keychainService = keychainService;
     this.properties      = new PropertyViewModel();
     this.Statements      = new ObservableCollection <StatementsViewModel>();
     this.CurrentBalance  = new ObservableCollection <StatementsViewModel>();
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.MainMenuPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="navigationService">Navigation service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        public MainMenuPageViewModel(IPageDialogService dialogService,
                                     INavigationService navigationService,
                                     IAuthenticationFacade authenticationFacade,
                                     IKeychainService keychainService) : base(dialogService, authenticationFacade, navigationService)
        {
            this.navigationService = navigationService;
            this.keychainService   = keychainService;

            this.LogoutCommand    = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LogoutAction).Forget(); });
            this.MyProfileCommand = new DelegateCommand(() =>
            {
                this.ExecuteAsyncTask(this.NavigateToProfilePage).Forget();
            });
        }
Ejemplo n.º 11
0
        public LoginPageViewModel(INavigationService navigationService,
                                  IAuthenticationFacade authenticationFacade,
                                  IPageDialogService dialogService,
                                  IKeychainService keychainService)
            : base(dialogService, authenticationFacade, navigationService)
        {
            this.authenticationFacade = authenticationFacade;
            this.navigationService    = navigationService;
            this.keychainService      = keychainService;

            this.LoginCommand = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LoginAction).Forget(); })
                                .ObservesCanExecute(() => this.CanLogin)
                                .ObservesProperty(() => this.Username)
                                .ObservesProperty(() => this.Password);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.MainMasterDetailPageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        /// <param name="authenticationFacade">Authentication facade.</param>
        /// <param name="navigationService">Navigation service.</param>
        public MainMasterDetailPageViewModel(IPageDialogService dialogService,
                                             IAuthenticationFacade authenticationFacade,
                                             INavigationService navigationService,
                                             IKeychainService keychainService)
            : base(dialogService, authenticationFacade, navigationService)
        {
            this.navigationService = navigationService;
            this.keychainService   = keychainService;

            this.LogoutCommand = new DelegateCommand(() => { this.ExecuteAsyncTask(this.LogoutAction).Forget(); });

            this.NavigationCommand = new DelegateCommand <string>((page) =>
            {
                navigationService.NavigateAsync(page);
            });
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="dialogService">Dialog service.</param>
        public AccountPageViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade, INavigationService navigationService, IPropertyFacade propertyFacade,
                                    IKeychainService keychainService) : base(dialogService, authenticationFacade, navigationService)
        {
            this.keychainService = keychainService;
            this.propertyFacade  = propertyFacade;
            this.Title           = "Account Page";

            this.PropertySelectedCommand = new DelegateCommand <PropertyViewModel>(this.PropertySelectedAction);

            this.navigationService = navigationService;
            PopulateStaticData();
            this.ExecuteAsyncTask(async() =>
            {
                await Task.WhenAll(new Task[] {
                    this.LoadProperty()
                });
            }).Forget();
        }
Ejemplo n.º 14
0
 public BaseViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade, INavigationService navigationService = null)
     : base(dialogService, navigationService)
 {
     AuthenticationFacade = authenticationFacade;
     DialogService        = dialogService;
 }
Ejemplo n.º 15
0
 public AuthenticationController(IAuthenticationFacade authenticationFacade)
 {
     this.authenticationFacade = authenticationFacade;
 }
Ejemplo n.º 16
0
 public AccountController(IAuthenticationFacade authenticationProvider,
                          IRouteProvider routeProvider)
 {
     _authenticationProvider = authenticationProvider;
     _routeProvider          = routeProvider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.HomePageViewModel"/> class.
 /// </summary>
 /// <param name="dialogService">Dialog service.</param>
 public ContactPageViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade) : base(dialogService, authenticationFacade)
 {
     this.Title = "Contact Page";
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.HomePageViewModel"/> class.
 /// </summary>
 /// <param name="dialogService">Dialog service.</param>
 /// <param name="navigationService">Navigation service.</param>
 public HomePageViewModel(IPageDialogService dialogService, INavigationService navigationService, IAuthenticationFacade authenticationFacade) : base(dialogService, authenticationFacade)
 {
     this.navigationService = navigationService;
     this.Title             = "Home Page";
     this.AccountCommand    = new DelegateCommand(this.AccountCommandAction);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.EventsDetailsPageViewModel"/> class.
 /// </summary>
 /// <param name="dialogService">Dialog service.</param>
 /// <param name="navigationService">Navigation service.</param>
 /// <param name="authenticationFacade">Authentication facade.</param>
 public EventsDetailsPageViewModel(IPageDialogService dialogService,
                                   INavigationService navigationService,
                                   IAuthenticationFacade authenticationFacade)
     : base(dialogService, authenticationFacade)
 {
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:CustomerPortalApp.ViewModels.MainNavigationPageViewModel"/> class.
 /// </summary>
 /// <param name="dialogService">Dialog service.</param>
 /// <param name="authenticationFacade">Authentication facade.</param>
 public MainNavigationPageViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade, INavigationService navigationService)
     : base(dialogService, authenticationFacade, navigationService)
 {
 }
 public AuthenticationController(IAuthenticationFacade authenticationFacade)
 {
     _authenticationFacade = authenticationFacade;
     _userManager          = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(new ApplicationDbContext()));
 }
 public SupportPageViewModel(IPageDialogService dialogService, IAuthenticationFacade authenticationFacade) : base(dialogService, authenticationFacade)
 {
     this.Title = "Support Page";
     PopulateFakeFAQSections();
 }