Exemplo n.º 1
0
 public AuthorizedUserController(IUsersService usersService, IDefaultValuesService defaultValuesService, ICookieService cookieService, IAuthorizedUserService authorizedUserService)
 {
     _usersService          = usersService;
     _defaultValuesService  = defaultValuesService;
     _cookieService         = cookieService;
     _authorizedUserService = authorizedUserService;
 }
Exemplo n.º 2
0
        public ChangePlaylistViewModel(IMvxNavigationService navigationService, IUserDialogs userDialogs, IValidator validator, ISongService songService, IPlaylistService playlistService, IAuthorizedUserService authorizedUserService, IBottomNavigationViewModelService bottomNavigationViewModelService, ITopNavigationViewModelService topNavigationViewModelService)
        {
            _navigationService                = navigationService;
            _topNavigationViewModelService    = topNavigationViewModelService;
            _bottomNavigationViewModelService = bottomNavigationViewModelService;

            _userDialogs = userDialogs;

            _validationHelper = new ValidationHelper(validator, this, Errors.Value, (propertyName) => { FocusName.Value = propertyName; });

            _songService           = songService;
            _playlistService       = playlistService;
            _authorizedUserService = authorizedUserService;

            ValidateNameCommand = new MvxCommand(() => _validationHelper.Validate(() => Name));

            ValidateSongsCommand = new MvxCommand(() => _validationHelper.Validate(() => Songs));

            InitValidationCommand = new MvxCommand(() => {
                _validationHelper.ResetValidation();
            });

            ChangeCommand = new MvxCommand(() =>
            {
                if (!IsTaskExecutedValueConverter.Convert(ChangeTask.Value))
                {
                    ChangeTask.Value = NotifyTaskCompletion.Create(AttemptChangeAsync);
                }
            });

            _songsTokenParentObject = new TokenParentHelper(new MvxCommand <TokenViewModel>((_) =>
            {
                Songs.Value?.Remove(_ as TokenViewModel <SongModel>);
                ValidateSongsCommand.Execute(null);
            }));
        }
Exemplo n.º 3
0
 public GenreService(IRestClient restClient, IAuthorizedUserService authorizedUserService)
 {
     _restClient            = restClient;
     _authorizedUserService = authorizedUserService;
 }
 public PlaylistService(IRestClient restClient, IAuthorizedUserService authorizedUserService)
 {
     _restClient            = restClient;
     _authorizedUserService = authorizedUserService;
 }