/// <summary> /// Initializes a new instance of the <see cref="PlanningPokerController" /> class. /// </summary> /// <param name="dateTimeProvider">The date time provider to provide current date-time.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="repository">The Scrum teams repository.</param> /// <param name="logger">Logger instance to log events.</param> public PlanningPokerController(DateTimeProvider dateTimeProvider, IPlanningPokerConfiguration configuration, IScrumTeamRepository repository, ILogger <PlanningPokerController> logger) { DateTimeProvider = dateTimeProvider ?? Duracellko.PlanningPoker.Domain.DateTimeProvider.Default; Configuration = configuration ?? new PlanningPokerConfiguration(); Repository = repository ?? new EmptyScrumTeamRepository(); _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="FileScrumTeamRepository" /> class. /// </summary> /// <param name="settings">The repository settings.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="dateTimeProvider">The date-time provider.</param> /// <param name="logger">Logger instance to log events.</param> public FileScrumTeamRepository(IFileScrumTeamRepositorySettings settings, IPlanningPokerConfiguration configuration, DateTimeProvider dateTimeProvider, ILogger <FileScrumTeamRepository> logger) { _settings = settings ?? throw new ArgumentNullException(nameof(settings)); _configuration = configuration ?? new PlanningPokerConfiguration(); _dateTimeProvider = dateTimeProvider ?? new DateTimeProvider(); _folder = new Lazy <string>(GetFolder); _invalidCharacters = new Lazy <char[]>(GetInvalidCharacters); _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="FileScrumTeamRepository" /> class. /// </summary> /// <param name="settings">The repository settings.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="dateTimeProvider">The date-time provider.</param> public FileScrumTeamRepository(IFileScrumTeamRepositorySettings settings, IPlanningPokerConfiguration configuration, DateTimeProvider dateTimeProvider) { if (settings == null) { throw new ArgumentNullException("settings"); } this.settings = settings; this.configuration = configuration ?? new PlanningPokerConfigurationElement(); this.dateTimeProvider = dateTimeProvider ?? new DateTimeProvider(); this.folder = new Lazy <string>(this.GetFolder); this.invalidCharacters = new Lazy <char[]>(GetInvalidCharacters); }
private static PlanningPokerController CreatePlanningPokerController( DateTimeProvider dateTimeProvider = null, IPlanningPokerConfiguration configuration = null, IScrumTeamRepository repository = null, ILogger <PlanningPokerController> logger = null) { if (logger == null) { logger = Mock.Of <ILogger <PlanningPokerController> >(); } return(new PlanningPokerController(dateTimeProvider, configuration, repository, logger)); }
/// <summary> /// Initializes a new instance of the <see cref="FileScrumTeamRepository" /> class. /// </summary> /// <param name="settings">The repository settings.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="scrumTeamSerializer">The serializer that provides serialization and desserialization of Scrum Team.</param> /// <param name="dateTimeProvider">The date-time provider.</param> /// <param name="guidProvider">The GUID provider to provide new GUID objects.</param> /// <param name="logger">Logger instance to log events.</param> public FileScrumTeamRepository( IFileScrumTeamRepositorySettings settings, IPlanningPokerConfiguration configuration, ScrumTeamSerializer scrumTeamSerializer, DateTimeProvider dateTimeProvider, GuidProvider guidProvider, ILogger <FileScrumTeamRepository> logger) { _settings = settings ?? throw new ArgumentNullException(nameof(settings)); _configuration = configuration ?? new PlanningPokerConfiguration(); _scrumTeamSerializer = scrumTeamSerializer ?? new ScrumTeamSerializer(dateTimeProvider, guidProvider, DeckProvider.Default); _dateTimeProvider = dateTimeProvider ?? DateTimeProvider.Default; _folder = new Lazy <string>(GetFolder); _invalidCharacters = new Lazy <char[]>(GetInvalidCharacters); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Initializes a new instance of the <see cref="PlanningPokerController" /> class. /// </summary> /// <param name="dateTimeProvider">The date time provider to provide current date-time.</param> /// <param name="guidProvider">The GUID provider to provide new GUID objects.</param> /// <param name="deckProvider">The provider to get estimation cards deck.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="repository">The Scrum teams repository.</param> /// <param name="taskProvider">The system tasks provider.</param> /// <param name="logger">Logger instance to log events.</param> public PlanningPokerController( DateTimeProvider dateTimeProvider, GuidProvider guidProvider, DeckProvider deckProvider, IPlanningPokerConfiguration configuration, IScrumTeamRepository repository, TaskProvider taskProvider, ILogger <PlanningPokerController> logger) { DateTimeProvider = dateTimeProvider ?? DateTimeProvider.Default; GuidProvider = guidProvider ?? GuidProvider.Default; _deckProvider = deckProvider ?? DeckProvider.Default; Configuration = configuration ?? new PlanningPokerConfiguration(); Repository = repository ?? new EmptyScrumTeamRepository(); _taskProvider = taskProvider ?? TaskProvider.Default; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public PlanningPokerCleanupService(IPlanningPoker planningPoker, IScrumTeamRepository teamRepository, IPlanningPokerConfiguration configuration) { _planningPoker = planningPoker ?? throw new ArgumentNullException(nameof(planningPoker)); _teamRepository = teamRepository ?? throw new ArgumentNullException(nameof(teamRepository)); _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); }
/// <summary> /// Initializes a new instance of the <see cref="PlanningPokerController" /> class. /// </summary> /// <param name="dateTimeProvider">The date time provider to provide current date-time.</param> /// <param name="configuration">The configuration of the planning poker.</param> /// <param name="repository">The Scrum teams repository.</param> public PlanningPokerController(DateTimeProvider dateTimeProvider, IPlanningPokerConfiguration configuration, IScrumTeamRepository repository) { this.DateTimeProvider = dateTimeProvider ?? Duracellko.PlanningPoker.Domain.DateTimeProvider.Default; this.Configuration = configuration ?? new PlanningPokerConfigurationElement(); this.Repository = repository ?? new EmptyScrumTeamRepository(); }
/// <summary> /// Initializes a new instance of the <see cref="FileScrumTeamRepositorySettings"/> class. /// </summary> /// <param name="configuration">The planning poker configuration.</param> public FileScrumTeamRepositorySettings(IPlanningPokerConfiguration configuration) { _configuration = configuration ?? new PlanningPokerConfiguration(); }
/// <summary> /// Initializes a new instance of the <see cref="FileScrumTeamRepositorySettings"/> class. /// </summary> /// <param name="configuration">The planning poker configuration.</param> public FileScrumTeamRepositorySettings(IPlanningPokerConfiguration configuration) { this.configuration = configuration ?? new PlanningPokerConfigurationElement(); }