Exemple #1
0
 public EventService(IEventRepository eventRepository, ITrackerRepository trackerRepository,
                     IEventFiltrationRepository eventFiltrationRepository)
 {
     _eventRepository           = eventRepository;
     _trackerRepository         = trackerRepository;
     _eventFiltrationRepository = eventFiltrationRepository;
 }
 public StatisticsService(IMultipleFactsRepository multipleFactsRepository,
                          ISingleFactsRepository singleFactsRepository, ITrackerRepository trackerRepository)
 {
     _multipleFactsRepository = multipleFactsRepository;
     _singleFactsRepository   = singleFactsRepository;
     _trackerRepository       = trackerRepository;
 }
Exemple #3
0
 public SnapshotImporter(ITrackerRepository tracker)
 {
     _tracker       = tracker;
     _logger        = new TrackerLogger();
     _decksFound    = 0;
     _decksImported = 0;
 }
 static EndGame()
 {
     _capture            = new TrackerCapture();
     _repository         = new TrackerRepository();
     _notificationFlyout = CreateDialogFlyout();
     _settingsFlyout     = CreateSettingsFlyout();
 }
Exemple #5
0
        public NoteViewModel(ITrackerRepository track, ILoggingService logger, IImageCaptureService capture)
        {
            Cards          = new ObservableCollection <Card>();
            Decks          = new ObservableCollection <MatchResult>();
            HasScreenshots = false;

            if (IsInDesignMode)
            {
                _repository    = new DesignerRepository();
                Screenshots    = DesignerData.GenerateScreenshots();
                HasScreenshots = true;
            }
            else
            {
                _repository = track;
            }
            _cap = capture;
            _log = logger;

            PropertyChanged += NoteViewModel_PropertyChanged;

            WindowClosingCommand = new RelayCommand(() => Closing());

            Update();
        }
 public void Init()
 {
     _trackerRepository = new TrackerRepository();
     _eventRepository   = new EventRepository();
     _eventService      =
         new EventService(_eventRepository, _trackerRepository,
                          EventFiltrationDapperRepository()); //TODO replace by in memory repository
     _tracker = TestingMethods.CreateTrackerWithDefaultCustomization(Guid.NewGuid());
     _event   = TestingMethods.CreateEvent(_tracker.Id, _tracker.CreatorId);
 }
Exemple #7
0
 public SnapshotImporter(IHttpClient http, ITrackerRepository tracker)
 {
     _http     = http;
     _tracker  = tracker;
     _logger   = new TrackerLogger();
     _settings = new JsonSerializerSettings()
     {
         NullValueHandling = NullValueHandling.Ignore
     };
 }
Exemple #8
0
 public void Init()
 {
     _multipleFactsRepository = new MultipleFactsRepository();
     _singleFactsRepository   = new SingleFactsRepository();
     _trackerRepository       = new TrackerRepository();
     _statisticsService       = new StatisticsService(
         _multipleFactsRepository,
         _singleFactsRepository,
         _trackerRepository);
     _events = InitializeEvents();
 }
Exemple #9
0
 public IssueCreationService(IProjectRepository projectRepository, ITrackerRepository trackerRepository,
                             IIssueStatusRepository issueStatusRepository, IIssuePriorityRepository issuePriorityRepository,
                             IUserRepository userRepository, IIssueRepository issueRepository)
 {
     _projectRepository       = projectRepository;
     _trackerRepository       = trackerRepository;
     _issueStatusRepository   = issueStatusRepository;
     _issuePriorityRepository = issuePriorityRepository;
     _userRepository          = userRepository;
     _issueRepository         = issueRepository;
 }
Exemple #10
0
 public Tracker(IValidator <EventTrainingMaterialViewRequest> eventTrainingMaterialViewValidator, IClubQuery clubQuery, IEventQuery eventQuery,
                ILibraryQuery libraryQuery, IMemberQuery memberQuery, ISquadQuery squadQuery, IAssignmentQuery assignmentQuery, ITrackerRepository trackerRepository)
 {
     this.eventTrainingMaterialViewValidator = eventTrainingMaterialViewValidator;
     this.clubQuery         = clubQuery;
     this.eventQuery        = eventQuery;
     this.libraryQuery      = libraryQuery;
     this.memberQuery       = memberQuery;
     this.squadQuery        = squadQuery;
     this.assignmentQuery   = assignmentQuery;
     this.trackerRepository = trackerRepository;
 }
 public StatisticGenerator(IMultipleFactsRepository multipleFactsRepository,
                           IMultipleTrackersFactProvider generalFactProvider,
                           ISingleTrackerFactProvider specificFactProvider,
                           ISingleFactsRepository singleFactsRepository,
                           ITrackerRepository trackerRepository,
                           IEventRepository eventRepository)
 {
     _multipleFactsRepository = multipleFactsRepository;
     _generalFactProvider     = generalFactProvider;
     _specificFactProvider    = specificFactProvider;
     _singleFactsRepository   = singleFactsRepository;
     _trackerRepository       = trackerRepository;
     _eventRepository         = eventRepository;
 }
Exemple #12
0
        private StatisticGenerator InitializeStatisticGeneratorWithTwoCalculators()
        {
            var generalFactProvider = new MultipleTrackersFactProvider();

            generalFactProvider.Add(new MostEventfulDayCalculator());
            var specificFactProvider = new SingleTrackerFactProvider();

            specificFactProvider.Add(new SingleTrackerEventsCountCalculator());

            _singleFactsRepository   = new SingleFactsRepository();
            _multipleFactsRepository = new MultipleFactsRepository();
            _trackerRepository       = new TrackerRepository();
            _eventRepository         = new EventRepository();
            return(new StatisticGenerator(_multipleFactsRepository,
                                          generalFactProvider,
                                          specificFactProvider,
                                          _singleFactsRepository,
                                          _trackerRepository,
                                          _eventRepository));
        }
Exemple #13
0
        public async Task <IActionResult> Create(
            CancellationToken cancellationToken,
            [FromBody] CreateTrackerBinding binding,
            [FromServices] ITrackerRepository trackerRepository)
        {
            var tracker = await trackerRepository.Get(binding.Id, cancellationToken);

            if (tracker != null)
            {
                if (!tracker.Name.Equals(binding.Name))
                {
                    throw new ApiException(HttpStatusCode.Conflict, ErrorCode.TrackerAlreadyExists, "Tracker already exists with other parameters");
                }
            }

            tracker = new Tracker(binding.Id, binding.Name);

            await trackerRepository.Save(tracker);

            return(CreatedAtRoute("GetTrackerAdminRoute", new { id = tracker.Id }, null));
        }
Exemple #14
0
        public async Task <IActionResult> Create(
            CancellationToken cancellationToken,
            [FromBody] CreateProjectBinding binding,
            [FromServices] IProjectRepository projectRepository,
            [FromServices] ITrackerRepository trackerRepository)
        {
            var project = await projectRepository.Get(binding.Id, cancellationToken);

            if (project != null)
            {
                if (!project.Name.Equals(binding.Name) ||
                    !project.Description.Equals(binding.Description))
                {
                    throw new ApiException(HttpStatusCode.Conflict, ErrorCode.ProjectAlreadyExists,
                                           "Project already exists with other parameters");
                }
            }

            project = new Project(binding.Id, binding.Name, binding.Description, binding.IsPrivate);

            foreach (var trackerId in binding.Trackers)
            {
                var tracker = await trackerRepository.Get(trackerId, cancellationToken);

                if (tracker == null)
                {
                    throw new ApiException(HttpStatusCode.NotFound, ErrorCode.TrackerNotFound, "Tracker not found");
                }

                var projectTracker = new ProjectTracker(binding.Id, tracker.Id);

                project.AddProjectTracker(projectTracker);
            }

            await projectRepository.Save(project);

            return(CreatedAtRoute("GetProjectAdminRoute", new { id = project.Id }, null));
        }
Exemple #15
0
 public TrackerController(ITrackerRepository trackerRepo)
 {
     TrackerRepo = trackerRepo;
 }
Exemple #16
0
 public ProfileController(ITrackerRepository repository, ILogger <ProfileController> logger)
 {
     _repository = repository;
     _logger     = logger;
 }
 public TrackerService(ITrackerRepository trackerRepository)
 {
     this.trackerRepository = trackerRepository;
 }
Exemple #18
0
 public AppController(ITrackerRepository repository)
 {
     _repository = repository;
 }
 public FoodController(ITrackerRepository repository, ILogger <FoodController> logger)
 {
     _repository = repository;
     _logger     = logger;
 }
Exemple #20
0
 public void Init()
 {
     _trackerRepository = new TrackerRepository();
     _trackerService    = new TrackerService(_trackerRepository);
     _tracker           = TestingMethods.CreateTrackerWithDefaultCustomization(Guid.NewGuid());
 }
 public HomeController(ITrackerRepository repo)
 {
     repository = repo;
 }
Exemple #22
0
 public UsersController(ITrackerRepository repository, ILogger <UsersController> logger, UserSummaryFactory userSummaryFactory)
 {
     this.repository         = repository ?? throw new ArgumentNullException(nameof(repository));
     this.logger             = logger ?? throw new ArgumentNullException(nameof(repository));
     this.userSummaryFactory = userSummaryFactory ?? throw new ArgumentNullException(nameof(userSummaryFactory));
 }
 public TrackerController(ITrackerRepository trackerRepo, IUserRepository userRepo, IClock clock)
 {
     m_trackerRepo = trackerRepo;
     m_userRepo    = userRepo;
     m_clock       = clock;
 }
 public MeasurementController(ITrackerRepository repository, ILogger <MeasurementController> logger)
 {
     _repository = repository;
     _logger     = logger;
 }
Exemple #25
0
 public IOUController(ITrackerRepository repository, ILogger <IOUController> logger)
 {
     this.repository = repository ?? throw new ArgumentNullException(nameof(repository));
     this.logger     = logger ?? throw new ArgumentNullException(nameof(repository));
 }
 public TrackerRequestService(IAppOptions appOptions, ICacheService <TrackerRequest> cacheService, ITrackerRepository userRepository)
     : base(appOptions, cacheService, userRepository)
 {
 }