protected UpdateRepository(UpdateRepositoryType type, string name, string repository, string repositoryUrl) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } if (string.IsNullOrWhiteSpace(repository)) { throw new ArgumentNullException(nameof(repository)); } Type = type; Name = name; Repository = repository; RepositoryUrl = repositoryUrl; _monitorTimer = new System.Timers.Timer(); _monitorTimer.Elapsed += MonitorTimerOnElapsed; }
public bool ContainsRepository(UpdateRepositoryType type, string repository) => _localizationRepositories.Any(v => v.Type == type && string.Compare(v.Repository, repository, StringComparison.OrdinalIgnoreCase) == 0);
public ILocalizationRepository?GetRepository(UpdateRepositoryType type, string repository) => _localizationRepositories.FirstOrDefault(v => v.Type == type && string.Compare(v.Repository, repository, StringComparison.OrdinalIgnoreCase) == 0);
public LocalizationSource(string name, string repository, UpdateRepositoryType type) { Name = name; Repository = repository; Type = type; }