Esempio n. 1
0
        private IEnumerable <VSTSRepository> CreateRepositories(int count)
        {
            return(Enumerable.Range(0, count)
                   .Select(i =>
            {
                var projectToTake = _random.Next(1, ProjectIds.Count() + 1);
                var projectId = ProjectIds.Any() ? ProjectIds.Take(projectToTake).Last() : Guid.Empty;

                return new VSTSRepository
                {
                    Id = Guid.NewGuid(),
                    Name = $"Repository {i}",
                    Project = projectId
                };
            }).ToList());
        }
Esempio n. 2
0
 public bool IsEmpty()
 {
     if (AllProjects && !AllArtifacts && (ArtifactIds == null || !ArtifactIds.Any()))
     {
         return(true);
     }
     else if (AllArtifacts && !AllProjects && (ProjectIds == null || !ProjectIds.Any()))
     {
         return(true);
     }
     else if (!AllArtifacts && !AllProjects &&
              ((ArtifactIds == null || !ArtifactIds.Any()) ||
               (ProjectIds == null || !ProjectIds.Any())))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }