Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public bool ContainsRepository(UpdateRepositoryType type, string repository) =>
 _localizationRepositories.Any(v => v.Type == type && string.Compare(v.Repository, repository, StringComparison.OrdinalIgnoreCase) == 0);
Ejemplo n.º 3
0
 public ILocalizationRepository?GetRepository(UpdateRepositoryType type, string repository) =>
 _localizationRepositories.FirstOrDefault(v => v.Type == type && string.Compare(v.Repository, repository, StringComparison.OrdinalIgnoreCase) == 0);
Ejemplo n.º 4
0
 public LocalizationSource(string name, string repository, UpdateRepositoryType type)
 {
     Name       = name;
     Repository = repository;
     Type       = type;
 }