public TilesManagerViewModel(IBandService bandService, IBandTileService tileService) { this.bandService = bandService; this.tileService = tileService; GetTilesCommand = new DelegateCommand(GetTiles); }
public BandsManagerViewModel(IBandService bandService) { this.bandService = bandService; GetBandsCommand = new DelegateCommand(GetBands); ConnectToBandCommand = new DelegateCommand(ConnectToBand); }
public AddBandPresenter(IAddBandView view, IGenreService genreService, ICountryService countryService, IBandService bandService) : base(view) { if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } if (countryService == null) { throw new ArgumentNullException(nameof(countryService)); } if (genreService == null) { throw new ArgumentNullException(nameof(genreService)); } this.genreService = genreService; this.countryService = countryService; this.bandService = bandService; this.View.NeedGenres += View_NeedGenres; this.View.NeedCountries += View_NeedCountries; this.View.RegisterBand += View_RegisterBand; }
public MediaPlayerController(IBandService bandService, IAlbumService albumService, ITrackService trackService) { BandService = bandService; AlbumService = albumService; TrackService = trackService; }
public AlbumService(IUnitOfWork unitOfWork, IMapper mapper, ITrackService trackService, IBandService bandService) { UnitOfWork = unitOfWork; this.mapper = mapper; TrackService = trackService; BandService = bandService; }
public void Constructor_ShouldThowsArgumentNullExceptionWhenBandServiceIsNull() { //Arange IBandService bandService = null; var viewMock = new Mock <ISearchDisplayView>(); //Act & Assert Assert.That(() => new SearchDisplayPresenter(viewMock.Object, bandService), Throws.Exception.TypeOf <ArgumentNullException>()); }
public void ThrowArgumentNullException_IfBandServiceIsNull() { var viewMock = new Mock <IBandListView>(); IBandService serviceMock = null; Assert.Throws <ArgumentNullException>(() => { BandListPresenter bandPresenter = new BandListPresenter(viewMock.Object, serviceMock); }); }
public void Constructor_ShouldThowsArgumentNullExceptionWhenBandServiceIsNull() { //Arange var genreServiceMock = new Mock <IGenreService>(); var countryServiceMock = new Mock <ICountryService>(); IBandService bandService = null; var viewMock = new Mock <IAddBandView>(); //Act & Assert Assert.That(() => new AddBandPresenter(viewMock.Object, genreServiceMock.Object, countryServiceMock.Object, bandService), Throws.Exception.TypeOf <ArgumentNullException>()); }
public SearchDisplayPresenter(ISearchDisplayView view, IBandService bandService) : base(view) { if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } this.bandService = bandService; this.View.OnSearchDisplayBands += View_OnSearchDisplayBands; }
public BandListPresenter(IBandListView view, IBandService bandService) : base(view) { if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } this.bandService = bandService; this.View.LoadBands += View_LoadBands; this.View.LoadAllBands += View_LoadAllBands; }
public void ThrowArgumentNullException_WhenBandServiceIsNull() { var viewMock = new Mock <ISingleBandDisplayView>(); var userServiceMock = new Mock <IUserService>(); IBandService bandServiceMock = null; Assert.Throws <ArgumentNullException>(() => { SingleBandDisplayPresenter presenter = new SingleBandDisplayPresenter( viewMock.Object, userServiceMock.Object, bandServiceMock); }); }
public void ThrowArgumentNullException_WhenBandService_IsNull() { var viewMock = new Mock <IBandsByGenreDisplayView>(); var genreService = new Mock <IGenreService>(); IBandService bandServiceMock = null; Assert.Throws <ArgumentNullException>(() => { var bandsByGenrePresenter = new BandsByGenreDisplayPresenter( viewMock.Object, genreService.Object, bandServiceMock); }); }
public MainPageViewModel(IBandService bandService, IEventAggregator events) { _bandService = bandService; _events = events; _enumerateBandsCmd = new Lazy<ICommand>(() => { return new AsyncDelegateCommand<object>(EnumerateBands, CanEnumerateBands); }); EnumerateBandsCmd.Execute(null); if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) { // designtime data Value = "Designtime value"; return; } }
public BandsByGenreDisplayPresenter(IBandsByGenreDisplayView view, IGenreService genreService, IBandService bandService) : base(view) { if (genreService == null) { throw new ArgumentNullException(nameof(genreService)); } if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } this.genreService = genreService; this.bandService = bandService; this.View.LoadGenres += View_LoadGenres; this.View.LoadBandsByGenre += View_LoadBandsByGenre; }
public SingleBandDisplayPresenter(ISingleBandDisplayView view, IUserService userService, IBandService bandService) : base(view) { if (userService == null) { throw new ArgumentNullException(nameof(userService)); } if (bandService == null) { throw new ArgumentNullException(nameof(bandService)); } this.userService = userService; this.bandService = bandService; this.View.OnFormGetBand += this.View_OnFormGetBand; this.View.AddToFavorites += this.View_AddToFavorites; }
public MainPageViewModel(IBandService bandService, IEventAggregator events, Services.INavigationService naviagtionService, IComponentContext container) { _container = container; _navigation = naviagtionService; _bandService = bandService; _events = events; _enumerateBandsCmd = new Lazy <ICommand>(() => { return(new AsyncDelegateCommand <object>(EnumerateBands, CanEnumerateBands)); }); EnumerateBandsCmd.Execute(null); if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) { // designtime data Value = "Designtime value"; return; } }
public BandsController(IBandService bandService, IMemoryCache cache) { this.bandService = bandService; this.cache = cache; }
public ListBand(IBandService bandSer) { _bandSer = bandSer; }
// maps the generic repo to my EFRepository public BandsController(IBandService bandService) { _bandService = bandService; }
public BandsController(IBandService service, IMapper mapper) { _service = service; _mapper = mapper; }
public BandsManagerDesignViewModel(IBandService bandService) { this.bandService = bandService; }
public SettingsViewModel(IBiometricsService biometricsService, IApplicationStateService applicationStateService, IBandService bandService, IShell shell) { Guard.NotNull(biometricsService, nameof(biometricsService)); Guard.NotNull(applicationStateService, nameof(applicationStateService)); Guard.NotNull(bandService, nameof(bandService)); this._biometricsService = biometricsService; this._applicationStateService = applicationStateService; this._bandService = bandService; this._shell = shell; var hasUser = new ReplaySubject<bool>(1); hasUser.OnNext(this._applicationStateService.GetCurrentUser() != null); var deviceAvailable = this._biometricsService.BiometricAuthDeviceIsAvailableAsync().ToObservable(); var canRememberLogin = hasUser.CombineLatest(deviceAvailable, (hasUsr, deviceAvail) => hasUsr && deviceAvail); this.RememberLogin = UwCoreCommand.Create(canRememberLogin, this.RememberLoginImpl) .ShowLoadingOverlay(CTime2Resources.Get("Loading.RememberedLogin")) .HandleExceptions() .TrackEvent("SetupRememberLogin"); var canToggleTile = this.WhenAnyValue(f => f.State, state => state != BandState.NotConnected); this.ToggleBandTile = UwCoreCommand.Create(canToggleTile, this.ToggleTileImpl) .ShowLoadingOverlay(() => this.State == BandState.Installed ? CTime2Resources.Get("Loading.RemoveTileFromBand") : CTime2Resources.Get("Loading.AddTileToBand")) .HandleExceptions() .TrackEvent("ToggleBandTile"); this.Reload = UwCoreCommand.Create(this.ReloadImpl) .ShowLoadingOverlay(CTime2Resources.Get("Loading.Settings")) .HandleExceptions() .TrackEvent("ReloadSettings"); this.Theme = this._applicationStateService.GetApplicationTheme(); this.SelectedWorkTime = this._applicationStateService.GetWorkDayHours(); this.SelectedBreakTime = this._applicationStateService.GetWorkDayBreak(); this.CompanyId = this._applicationStateService.GetCompanyId(); this.WhenAnyValue(f => f.Theme) .Subscribe(theme => { this._shell.Theme = theme; this._applicationStateService.SetApplicationTheme(theme); }); this.WhenAnyValue(f => f.SelectedWorkTime) .Subscribe(workTime => { this._applicationStateService.SetWorkDayHours(workTime); }); this.WhenAnyValue(f => f.SelectedBreakTime) .Subscribe(breakTime => { this._applicationStateService.SetWorkDayBreak(breakTime); }); this.WhenAnyValue(f => f.CompanyId) .Subscribe(companyId => { this._applicationStateService.SetCompanyId(companyId); }); this.DisplayName = CTime2Resources.Get("Navigation.Settings"); this.WorkTimes = new ReactiveList<TimeSpan>(Enumerable .Repeat((object)null, 4 * 24) .Select((_, i) => TimeSpan.FromHours(0.25 * i))); this.BreakTimes = new ReactiveList<TimeSpan>(Enumerable .Repeat((object)null, 4 * 24) .Select((_, i) => TimeSpan.FromHours(0.25 * i))); }
public BandController(IMapper mapper, IBandService bandService) { _mapper = mapper; _bandService = bandService; }
public HomeController(IUserService service, IConcertService concService, IBandService bandService) { UserService = service; ConcertService = concService; BandService = bandService; }
public BandsController( IBandService bandService ){ this.bandService = bandService; }//END constructor
public Band(IBandInfo info, IBandService bandService, IComponentContext container) { _container = container; _info = info; _bandService = bandService; }
public BandsController(IBandService bandService, IMapper mapper) { _bandService = bandService; _mapper = mapper; }
public BandController(IBandService serv) { bandService = serv; }
public BandsController(IBandService service) { _bandservice = service; }