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; }
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(); }
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); }
public SnapshotImporter(IHttpClient http, ITrackerRepository tracker) { _http = http; _tracker = tracker; _logger = new TrackerLogger(); _settings = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }; }
public void Init() { _multipleFactsRepository = new MultipleFactsRepository(); _singleFactsRepository = new SingleFactsRepository(); _trackerRepository = new TrackerRepository(); _statisticsService = new StatisticsService( _multipleFactsRepository, _singleFactsRepository, _trackerRepository); _events = InitializeEvents(); }
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; }
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; }
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)); }
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)); }
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)); }
public TrackerController(ITrackerRepository trackerRepo) { TrackerRepo = trackerRepo; }
public ProfileController(ITrackerRepository repository, ILogger <ProfileController> logger) { _repository = repository; _logger = logger; }
public TrackerService(ITrackerRepository trackerRepository) { this.trackerRepository = trackerRepository; }
public AppController(ITrackerRepository repository) { _repository = repository; }
public FoodController(ITrackerRepository repository, ILogger <FoodController> logger) { _repository = repository; _logger = logger; }
public void Init() { _trackerRepository = new TrackerRepository(); _trackerService = new TrackerService(_trackerRepository); _tracker = TestingMethods.CreateTrackerWithDefaultCustomization(Guid.NewGuid()); }
public HomeController(ITrackerRepository repo) { repository = repo; }
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; }
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) { }