public void SetUp()
 {
     _playerService = Substitute.For<IPlayerService>();
     _teamService = Substitute.For<ITeamService>();
     sut = new PlayerController(_playerService, _teamService);
     SetUpMappings();
 }
Exemplo n.º 2
0
 public AdminController(IRoundService roundService, ISeriesService seriesService, ITeamService teamService, IGameService gameService)
 {
     _seriesService = seriesService;
     _roundService  = roundService;
     _teamService   = teamService;
     _gameService   = gameService;
 }
Exemplo n.º 3
0
        public OwnersListViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]ITeamService teamServices,
            [Import]IBackgroundExecutor backgroundExecutor,
            [Import] IDialogService dialogs,
            [Import]IAuthorizationService authorizationService)
        {
            this.aggregator = eventAggregator;

            this.teamServices = teamServices;
            this.executor = backgroundExecutor;
            this.authorizator = authorizationService;
            this.dialogs = dialogs;

            aggregator.Subscribe(ScrumFactoryEvent.ShowOwnersList, Show);

            CloseWindowCommand = new DelegateCommand(CloseWindow);
            OnLoadCommand = new DelegateCommand(LoadOwners);

            ChangeFactoryOwnerCommand = new DelegateCommand<string>(ChangeFactoryOwner);
            ChangeCanSeeProposalsCommand = new DelegateCommand<string>(ChangeCanSeeProposals);

            AddNewMemberCommand = new DelegateCommand(AddNewMember);

            RefreshMemberFilter = LoadMembers;
        }
Exemplo n.º 4
0
        public MemberViewModel(
            [Import(typeof(IAuthorizationService))] IAuthorizationService authorizator,
            [Import(typeof(IBackgroundExecutor))] IBackgroundExecutor executor,
            [Import(typeof(IEventAggregator))] IEventAggregator aggregator,
            [Import] IDialogService dialogs,
            [Import(typeof(ITasksService))] ITasksService taskService,
            [Import(typeof(ITeamService))] ITeamService teamService)
        {
            this.taskService = taskService;
            this.authorizator = authorizator;
            this.executor = executor;
            this.aggregator = aggregator;
            this.teamService = teamService;
            this.dialogs = dialogs;

            aggregator.Subscribe(ScrumFactoryEvent.ShowProfile, Show);
            aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);

            ChangeAvatarCommand = new DelegateCommand(ChangeMemberImage);
            RemoveAvatarCommand = new DelegateCommand(RemoveMemberImage);
            CloseWindowCommand = new DelegateCommand(Close);
            CreateAvatarCommand = new DelegateCommand(CreateAvatar);

            UpdateAvatarCommand = new DelegateCommand(() => {
                executor.StartBackgroundTask(
                () => {
                    teamService.UpdateMember(authorizator.SignedMemberProfile.MemberUId, MemberProfile);
                }, () => {
                    myProfileNocache = new Random().Next().ToString();
                    DefineMemberAvatarUrl();
                });
            });
        }
        public void SetUp()
        {
            _teamService = Substitute.For<ITeamService>();
            sut = new TeamController(_teamService);

            SetUpMappings();
        }
        public TeamsController(ITeamService teamService, IDayOfWeekService dayOfWeekService)
        {
            Check.Require(teamService != null, "teamService may not be null");
            Check.Require(dayOfWeekService != null, "dayOfWeekService may not be null");

            this.teamService = teamService;
            this.dayOfWeekService = dayOfWeekService;
        }
 public TeamsController(ICompetitionService competitionService,
     IStatsReportingService playerService,
     ITeamService teamService)
 {
     this.competitionService = competitionService;
     this.statsReportingService = playerService;
     this.teamService = teamService;
 }
Exemplo n.º 8
0
        public TeamServiceTests()
        {
            m_kernel = new StandardKernel();
            m_kernel.Load(Assembly.GetExecutingAssembly());

            m_teams = m_kernel.Get<ITeamService>();
            m_teams.ApiKey = Settings1.Default.ApiKey;
        }
        public TeamController(ITeamService teamService
			, IExcelService excelService
			, IGameService gameService)
        {
            _teamService = teamService;
            _excelService = excelService;
            _gameService = gameService;
        }
 public MyTeamController(ITeamService teamService,
     IMembershipService membershipService,
     IDayOfWeekService dayOfWeekService)
 {
     this.teamService = teamService;
     this.membershipService = membershipService;
     this.dayOfWeekService = dayOfWeekService;
 }
 public TblDataService(INewsService newsService, IFixtureService fixtureService, ITeamService teamService, ICompetitionService competitionService, IStatsReportingService statsReportingService, IPlayerService playerService)
 {
     this.newsService        = newsService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.competitionService = competitionService;
     this.statsReportingService       = statsReportingService;
     this.playerService      = playerService;
 }
        public UsersController(IUserService userService,
            ITeamService teamService)
        {
            Check.Require(userService != null, "userService may not be null");
            Check.Require(teamService != null, "teamService may not be null");

            this.userService = userService;
            this.teamService = teamService;
        }
        public PlayersController(IPlayerService playerService,
            ITeamService teamService)
        {
            Check.Require(playerService != null, "playerService may not be null");
            Check.Require(teamService != null, "teamService may not be null");

            this.playerService = playerService;
            this.teamService = teamService;
        }
 public PenaltiesController(IPenaltyService penaltyService,
     ILeagueService leagueService,
     ITeamService teamService,
     IMatchResultService matchResultService)
 {
     this.penaltyService = penaltyService;
     this.leagueService = leagueService;
     this.teamService = teamService;
     this.matchResultService = matchResultService;
 }
        public TeamBetTeamXController(ITeamBetTeamXService teambetteamxService
			, IExcelService excelService
			, IBetTeamService betTeamService
			, ITeamService teamService)
        {
            _teambetteamxService = teambetteamxService;
            _excelService = excelService;
            _betTeamService = betTeamService;
            _teamService = teamService;
        }
        public RoundController(IRoundService roundService
			, IExcelService excelService
			, IMatchService matchService
			, ITeamService teamService)
        {
            _roundService = roundService;
            _excelService = excelService;
            _matchService = matchService;
            _teamService = teamService;
        }
 public FixturesController(ICompetitionService competitionService,
     IFixtureService fixtureService,
     ITeamService teamService,
     ICupService cupService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.cupService         = cupService;
 }
        public TeamLeaguesController(ITeamLeagueService teamLeagueService,
            ICompetitionService competitionService,
            ITeamService teamService)
        {
            Check.Require(teamLeagueService != null, "teamLeagueService may not be null");
            Check.Require(competitionService != null, "competitionService may not be null");
            Check.Require(teamService != null, "teamService may not be null");

            this.teamLeagueService = teamLeagueService;
            this.competitionService = competitionService;
            this.teamService = teamService;
        }
        public LeagueWinnersController(ILeagueWinnerService leagueWinnerService,
            ILeagueService leagueService,
            ITeamService teamService)
        {
            Check.Require(leagueWinnerService != null, "leagueWinnerService may not be null");
            Check.Require(leagueService != null, "leagueService may not be null");
            Check.Require(teamService != null, "teamService may not be null");

            this.leagueWinnerService = leagueWinnerService;
            this.leagueService = leagueService;
            this.teamService = teamService;
        }
Exemplo n.º 20
0
 public TeamController(IRegisterService registerService,
     ITeamService teamService,
     ITaskService taskService,
     IUserService userService,
     IAuthroizationService authService)
 {
     _registerService = registerService;
     _teamService = teamService;
     _taskService = taskService;
     _userService = userService;
     _authService = authService;
 }
Exemplo n.º 21
0
 public UsersController(
     IUnitOfWork unitOfWork, 
     IUserService userService, 
     ITeamService teamService, 
     IUserSessionService userSessionService,
     IStadiumService stadiumService
 )
 {
     _unitOfWork = unitOfWork;
     _userService = userService;
     _teamService = teamService;
     _userSessionService = userSessionService;
     _stadiumService = stadiumService;
 }
Exemplo n.º 22
0
        public ProjectTeamViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]IProjectsService projectsServices,
            [Import]ITeamService teamServices,
            [Import]ITasksService taskServices,
            [Import]IBackgroundExecutor backgroundExecutor,
            [Import] IDialogService dialogs,
            [Import]IAuthorizationService authorizationService)
        {
            this.taskServices = taskServices;
            this.aggregator = eventAggregator;
            this.projectsServices = projectsServices;
            this.teamServices = teamServices;
            this.executor = backgroundExecutor;
            this.authorizator = authorizationService;
            this.dialogs = dialogs;

            ShowRolesListCommand = new DelegateCommand(CanShowRoleList, ShowRolesList);
            AddNewMemberCommand = new DelegateCommand(CanAddNewMember, AddNewMember);

            RemoveMemberCommand = new DelegateCommand<ProjectMembershipViewModel>(CanRemoveMember, RemoveMember);

            ShowJoinDialogCommand = new DelegateCommand(CanJoinProject, ShowJoinDialog);

            ShowContactListCommand = new DelegateCommand(ShowContactList);

            SelectNewRoleCommand = new DelegateCommand<Role>(SelectNewRole);

            membershipViewSource = new System.Windows.Data.CollectionViewSource();
            membershipViewSource.SortDescriptions.Add(new SortDescription("SortPriority", ListSortDirection.Ascending));
            membershipViewSource.SortDescriptions.Add(new SortDescription("ProjectMembership.Role.RoleName", ListSortDirection.Ascending));
            membershipViewSource.SortDescriptions.Add(new SortDescription("Member.FullName", ListSortDirection.Ascending));

            membershipViewSource.Filter += new System.Windows.Data.FilterEventHandler(membershipViewSource_Filter);

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, OnViewProjectDetails);

            aggregator.Subscribe<ICollection<Role>>(ScrumFactoryEvent.ProjectRolesChanged, roles => { OnPropertyChanged("Roles"); });
            aggregator.Subscribe<Role>(ScrumFactoryEvent.ProjectRoleChanged, role => { membershipViewSource.View.Refresh(); });

            aggregator.Subscribe(ScrumFactoryEvent.ShowProjectTeam, () => { aggregator.Publish<IProjectTabViewModel>(ScrumFactoryEvent.ShowProjectTab, this); });

            // need thi when membership is removed from the project module
            aggregator.Subscribe<ProjectMembership>(ScrumFactoryEvent.ProjectMembershipRemoved, AfterRemoveMember);

            MemberCustomFilter = MemberFilter;

            RefreshMemberFilter = LoadMembers;
        }
        public CupWinnersController(ICupWinnerService cupWinnerService,
            ICupService cupService,
            ITeamService teamService,
            ICompetitionService competitionService)
        {
            Check.Require(cupWinnerService        != null, "leagueWinnerService may not be null");
            Check.Require(cupService              != null, "leagueService may not be null");
            Check.Require(teamService             != null, "teamService may not be null");
            Check.Require(competitionService      != null, "competitionService may not be null");

            this.cupWinnerService   = cupWinnerService;
            this.cupService         = cupService;
            this.teamService        = teamService;
            this.competitionService = competitionService;
        }
 public FixturesController(ICompetitionService competitionService,
     IFixtureService fixtureService,
     ITeamService teamService,
     IRefereeService refereeService,
     IMembershipService membershipService,
     ICupService cupService,
     IOneOffVenueService oneOffVenueService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.refereeService     = refereeService;
     this.membershipService  = membershipService;
     this.cupService         = cupService;
     this.oneOffVenueService    = oneOffVenueService;
 }
 public AssociateMemberAccountService(IAccountService accountService,
     IAccountHelper accountHelper,
     IAccountConnectionService accountConnectionService,
     UserHelper userHelper,
     ITeamService teamService,
     ITeamRepository teamRepository,
     ILoggerFactory factory)
 {
     this._accountService = accountService;
     this._accountHelper = accountHelper;
     this._userHelper = userHelper;
     this._accountConnectionService = accountConnectionService;
     this._teamService = teamService;
     this._teamRepository = teamRepository;
     this._logger = factory.Create(typeof(AssociateMemberAccountService));
 }
Exemplo n.º 26
0
        public ContactListViewModel(
            [Import]IEventAggregator eventAggregator,
            [Import]ITeamService teamServices,
            [Import]IBackgroundExecutor backgroundExecutor,
            [Import] IDialogService dialogs,
            [Import]IAuthorizationService authorizationService)
        {
            this.aggregator = eventAggregator;
            this.teamServices = teamServices;
            this.executor = backgroundExecutor;
            this.authorizator = authorizationService;
            this.dialogs = dialogs;

            aggregator.Subscribe<Project>(ScrumFactoryEvent.ViewProjectDetails, p => { project = p; });

            CloseWindowCommand = new DelegateCommand(CloseWindow);
            AddNewContactCommand = new DelegateCommand(AddNewContact);
            OnLoadCommand = new DelegateCommand(LoadData);
            SendEmailCommand = new DelegateCommand<string>(SendEmail);
        }
Exemplo n.º 27
0
        public MemberDetailBase(
            IEventAggregator aggregator,
            ITasksService tasksService,
            IProjectsService projectsService,
            ITeamService teamService,
            IBackgroundExecutor executor,
            IAuthorizationService authorizator)
        {
            this.aggregator = aggregator;
                this.executor = executor;
                this.authorizator = authorizator;
                this.tasksService = tasksService;
                this.teamService = teamService;
                this.projectsService = projectsService;

                ShowTaskDetailCommand = new DelegateCommand<Task>(ShowTaskDetail);
                ShowProjectDetailCommand = new DelegateCommand<string>(ShowProjectDetail);
                CloseTaskCommand = new DelegateCommand<Task>(CloseTask);

                TrackTaskCommand = new DelegateCommand<Task>(TrackTask);
        }
Exemplo n.º 28
0
        public MembersListViewModel(
            [Import] IBackgroundExecutor backgroundExecutor,
            [Import] IEventAggregator eventAggregator,
            [Import] IAuthorizationService authorizator,
            [Import] IDialogService dialogService,
            [Import] ITeamService teamService,
            [Import] IProjectsService projectService)
        {
            this.aggregator = eventAggregator;
                this.executor = backgroundExecutor;
                this.authorizator = authorizator;
                this.dialogs = dialogService;

                this.teamService = teamService;
                this.projectService = projectService;

                membersViewSource = new System.Windows.Data.CollectionViewSource();
                membersViewSource.SortDescriptions.Add(new SortDescription("MemberProfile.FullName", ListSortDirection.Ascending));

                membersViewSource.Filter += new FilterEventHandler(membersViewSource_Filter);
                delayFilter = new DelayAction(500, new DelayAction.ActionDelegate(() => { if (FilteredMembers != null) FilteredMembers.Refresh(); }));

                aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.SignedMemberChanged, OnSignedMemberChanged);

                aggregator.Subscribe<MemberProfile>(ScrumFactoryEvent.ShowMemberDetail,
                    member => {
                        dialogs.SelectTopMenu(this);
                        ShowDetail(member);
                    });

                OnLoadCommand = new DelegateCommand(() => { if (NeedRefresh) LoadMembers(); });
                RefreshCommand = new DelegateCommand(LoadMembers);
                ShowDetailWindowCommand = new DelegateCommand<MemberViewModel>(ShowDetail);

                AddNewMemberCommand = new DelegateCommand(CanAddMember, AddMember);

                OnlyActiveMembers = true;

                NeedRefresh = true;
        }
 public TeamsModelService(IAsyncRepository <ApplicationCore.Entities.Team> teamRepository,
                          ITeamService teamService)
 {
     this.teamRepository = teamRepository;
     this.teamService    = teamService;
 }
 public UserService(IUserRepository userRepository, IMapper mapper, ITeamService teamService)
 {
     this.userRepository = userRepository;
     this.mapper         = mapper;
     this.teamService    = teamService;
 }
Exemplo n.º 31
0
 public ScoreService(IOrchardServices orchardServices, ITeamScoreService teamScoreService, ITeamService teamService)
     : base(orchardServices)
 {
     _teamScoreService = teamScoreService;
     _teamService      = teamService;
 }
Exemplo n.º 32
0
 // GET: Evenement/Edit/5
 public ActionResult Edit(int id)
 {
     ts = new TeamService();
     return(View());
 }
Exemplo n.º 33
0
 public TeamsController(ITeamService teamService, IPlayerService playerService)
 {
     _teamService = teamService;
     _playerService = playerService;
 }
Exemplo n.º 34
0
 public TeamsDialog(IAuthenticationService authenticationService, ITeamService teamService)
     : base(authenticationService)
 {
     this.teamService = teamService;
 }
Exemplo n.º 35
0
 /// <summary>
 /// 建構式
 /// </summary>
 /// <param name="logger">logger</param>
 /// <param name="teamService">teamService</param>
 public RegisterController(ILogger <RegisterController> logger, ITeamService teamService)
 {
     this.logger      = logger;
     this.teamService = teamService;
 }
 /// <summary>
 /// 建構式
 /// </summary>
 /// <param name="logger">logger</param>
 /// <param name="teamService">teamService</param>
 public GetRecommendationTeamDataListController(ILogger <GetRecommendationTeamDataListController> logger, ITeamService teamService)
 {
     this.logger      = logger;
     this.teamService = teamService;
 }
Exemplo n.º 37
0
 public TaskSaga(ITeamService userLocationService, IBus messageBus)
 {
     this.teamService = userLocationService;
     this.messageBus  = messageBus;
 }
Exemplo n.º 38
0
 public TeamController(ITeamService teamService)
 {
     this.teamService = teamService;
 }
Exemplo n.º 39
0
 public ShowEventCommand(IEventService eventService, ITeamService teamService)
 {
     this.eventService = eventService;
     this.teamService  = teamService;
 }
 public TeamController(ITeamService teamService)
 {
     _teamService = teamService;
 }
 /// <summary>
 /// 建構式
 /// </summary>
 /// <param name="logger">logger</param>
 /// <param name="teamService">teamService</param>
 public GetTeamDataListOfMemberController(ILogger <GetTeamDataListOfMemberController> logger, ITeamService teamService)
 {
     this.logger      = logger;
     this.teamService = teamService;
 }
Exemplo n.º 42
0
 public InviteToTeamCommand(ITeamService teamService)
 {
     this.teamService = teamService;
 }
Exemplo n.º 43
0
 /// <summary>
 /// 建構式
 /// </summary>
 /// <param name="logger">logger</param>
 /// <param name="teamService">teamService</param>
 public EditTeamDataController(ILogger <EditTeamDataController> logger, ITeamService teamService)
 {
     this.logger      = logger;
     this.teamService = teamService;
 }
Exemplo n.º 44
0
 public DeclineInviteCommand(IInvitationService invitationService, ITeamService teamService)
 {
     this.invitationService = invitationService;
     this.teamService       = teamService;
 }
        public TournamentRegisterTeamValidator(UserManager <AppUser> userManager, ITournamentService tournamentService, ITeamService teamService)
        {
            _tournamentService = tournamentService;
            _userManager       = userManager;
            _teamService       = teamService;

            RuleFor(I => I.TournamentId).Must(I => IsUpcoming(I)).WithMessage("Tournament is already started/finished.");
            RuleFor(I => I).Must(I => IsUserTeamOwner(I)).WithMessage("You are not owner of this team.");
            RuleFor(I => I).Must(I => !IsUserRegisteredAnotherTeam(I)).WithMessage("You already registered your own other team.");
        }
 public TeamController(ITeamService service, IPagingService pager)
 {
     this.service = service;
     this.pager   = pager;
 }
Exemplo n.º 47
0
 public TeamController(ITeamService service)
 {
     _service = service;
 }
Exemplo n.º 48
0
 public DisbandCommand(ITeamService teamService, IUserTeamService userTeamService, IInvitationService invitationService)
 {
     this.teamService       = teamService;
     this.userTeamService   = userTeamService;
     this.invitationService = invitationService;
 }
Exemplo n.º 49
0
 public EditTeamViewModel()
 {
     Service = new TeamService();
 }
Exemplo n.º 50
0
 public RegisterController(ITeamService teamService)
 {
     this.TeamService = teamService;
 }
Exemplo n.º 51
0
 public TeamsController(ITeamService teams)
 {
     this.teams = teams;
 }
 public TeamDefinitionApiController(ITeamService mprCoreService)
 {
     _TeamService = mprCoreService;
 }
Exemplo n.º 53
0
 public HelperService(IPlayerService pservic, IRosterTransactionService rtservice, ITeamService tservice, IRosterHistoryService rhservice)
 {
     _pservice  = pservic;
     _tservice  = tservice;
     _rtservice = rtservice;
     _rhservice = rhservice;
 }
Exemplo n.º 54
0
 public TeamController(ITeamService mock)
 {
     _teamService = mock;
 }
 public ChampionshipController(IChampionshipService championshipService, ITeamService teamService)
 {
     this.championshipService = championshipService;
     this.teamService         = teamService;
 }
Exemplo n.º 56
0
 /// <summary>
 /// Konstruktor z dependency injection oraz ładowanie contextu bazy danych
 /// </summary>
 /// <param name="context"></param>
 /// <param name="teamService"></param>
 /// <param name="mapper"></param>
 public TeamControllerAPI(ApplicationDbContext context, ITeamService teamService, IMapper mapper)
 {
     _teamService = teamService;
     _teamService.LoadDb(context);
     _mapper = mapper;
 }
Exemplo n.º 57
0
 public FielderStatisticsViewModel(ITeamService teamService,
                                   IPlayerInningService playerInningService,
                                   StatisticsService statistics) : base(teamService, playerInningService, statistics)
 {
     FielderStatistics = Statistics.OrderByDescending(b => b.Catches).ToList();
 }
Exemplo n.º 58
0
 public SiteSettingController(ISiteSettingService siteSettingService, IMapper mapper, IFileService fileService, ITeamService teamService
                              , UserManager <AppUser> userManager, IUserService userService, ISocialNetworkService socialNetworkService, ISliderService sliderService)
 {
     this._sliderService        = sliderService;
     this._socialNetworkService = socialNetworkService;
     this._userManager          = userManager;
     this._userService          = userService;
     this._siteSettingService   = siteSettingService;
     this._mapper      = mapper;
     this._fileService = fileService;
     this._teamService = teamService;
 }
Exemplo n.º 59
0
 public UserService(IUserRepository userRepository, ITeamService teamService, IStadiumRepository stadiumRepository)
 {
     _userRepository = userRepository;
     _teamService = teamService;
     _stadiumRepository = stadiumRepository;
 }
 /// <summary>
 /// This contructor is to inject object using dependency injection
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="team"></param>
 public TeamController(ILogger <TeamController> logger, ITeamService team)
 {
     _logger = logger;
     _team   = team;
 }