//TODO: Inject a Func<IGoogleLoginView> instead
 public GoogleProvider(IAuthorizationModel authorizationModel, IRegionManager regionManager, IGoogleLoginView loginView, ILoggerFactory loggerFactory)
 {
     _authorizationModel = authorizationModel;
     _regionManager = regionManager;
     _loginView = loginView;
     _logger = loggerFactory.GetLogger();
     _logger.Debug("GoogleProvider.ctor(...)");
     _regionManager.Regions["WindowRegion"].Add(_loginView);
     _authorizationModel.RegisterAuthorizationCallback(ShowGoogleLogin);
     _authorizeCommand = new DelegateCommand(RequestAuthorization, () => !Status.IsAuthorized && !Status.IsProcessing);
     _authorizationModel.Status.Subscribe(_ =>
     {
         OnPropertyChanged("Status");
         _authorizeCommand.RaiseCanExecuteChanged();
     });
 }
Пример #2
0
 public AuthorizationController(IAuthorizationModel authorizationModel)
 {
     AuthorizationModel = authorizationModel;
 }
 public GoogleContactQueryProvider(IAuthorizationModel authorizationModel, IWebRequstService webRequstService, ILoggerFactory loggerFactory)
 {
     _authorizationModel = authorizationModel;
     _webRequstService = webRequstService;
     _logger = loggerFactory.GetLogger();
 }
 public GoogleIdentityProvider(Authorization.IAuthorizationModel authorizationModel, IWebRequstService webRequstService, ILoggerFactory loggerFactory)
 {
     _authorizationModel = authorizationModel;
     _webRequstService = webRequstService;
     _logger = loggerFactory.GetLogger();
 }