/// <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); }
/// <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)); }