Пример #1
0
        public LoginViewModel(ILoggerFacade logger, IEventAggregator eventAggregator, IRegionManager regionManager, IAuthenticationService authenticationService, IAuthenticationTokenStorage tokenStorage)
            : base(logger, eventAggregator)
        {
            Requires.NotNull(regionManager, "regionManager");
            _regionManager = regionManager;

            Requires.NotNull(authenticationService, "authenticationService");
            _authenticationService = authenticationService;
            
            Requires.NotNull(tokenStorage, "tokenStorage");
            _tokenStorage = tokenStorage;

            _lazySignInCommand = new Lazy<ICommand>(() => new DelegateCommand(OnSignIn, CanSignIn));
        }
Пример #2
0
        public AuthenticationService(IAuthenticationTokenStorage tokenStorage, string endpoint)
            : this(tokenStorage, endpoint, TimeSpan.FromSeconds(30))
        {

        }
Пример #3
0
        public AuthenticationService(IAuthenticationTokenStorage tokenStorage)
            : this(tokenStorage, Settings.Default.Endpoint)
        {

        }
Пример #4
0
 public AuthenticationService(IAuthenticationTokenStorage tokenStorage, string endpoint, TimeSpan timeout)
     : base(endpoint, timeout)
 {
     Requires.NotNull(tokenStorage, "tokenStorage");
     _tokenStorage = tokenStorage;
 }