Ejemplo n.º 1
0
        public static Conflicts SearchAllConflicts(ClassesSchedule schedule)
        {
            var conflicts  = new Conflicts();
            var allClasses = schedule.ToList();

            conflicts.AddRange(GreaterFourClassesPerDay(allClasses));
            conflicts.AddRange(GroupsInDifferentClassrooms(allClasses));
            conflicts.AddRange(LecterersInDifferentClassrooms(allClasses));
            conflicts.AddRange(NextClassesAtDifferentAddress(allClasses));
            return(conflicts);
        }
Ejemplo n.º 2
0
        public void Populate(ManifestMetadata manifestMetadata)
        {
            IPackageMetadata metadata = manifestMetadata;

            Id      = metadata.Id;
            Version = metadata.Version;
            Title   = metadata.Title;
            Authors.AddRange(metadata.Authors);
            Owners.AddRange(metadata.Owners);
            IconUrl    = metadata.IconUrl;
            LicenseUrl = metadata.LicenseUrl;
            ProjectUrl = metadata.ProjectUrl;
            RequireLicenseAcceptance = metadata.RequireLicenseAcceptance;
            DevelopmentDependency    = metadata.DevelopmentDependency;
            Description      = metadata.Description;
            Summary          = metadata.Summary;
            ReleaseNotes     = metadata.ReleaseNotes;
            Language         = metadata.Language;
            Copyright        = metadata.Copyright;
            MinClientVersion = metadata.MinClientVersion;
            ContentFiles     = new Collection <ManifestContentFiles>(manifestMetadata.ContentFiles);

            ProjectSourceUrl = metadata.ProjectSourceUrl;
            PackageSourceUrl = metadata.PackageSourceUrl;
            DocsUrl          = metadata.DocsUrl;
            WikiUrl          = metadata.WikiUrl;
            MailingListUrl   = metadata.MailingListUrl;
            BugTrackerUrl    = metadata.BugTrackerUrl;
            Replaces.AddRange(metadata.Replaces);
            Provides.AddRange(metadata.Provides);
            Conflicts.AddRange(metadata.Conflicts);

            SoftwareDisplayName    = metadata.SoftwareDisplayName;
            SoftwareDisplayVersion = metadata.SoftwareDisplayVersion;

            if (metadata.Tags != null)
            {
                Tags.AddRange(ParseTags(metadata.Tags));
            }

            DependencySets.AddRange(metadata.DependencySets);
            FrameworkReferences.AddRange(metadata.FrameworkAssemblies);

            if (manifestMetadata.ReferenceSets != null)
            {
                PackageAssemblyReferences.AddRange(manifestMetadata.ReferenceSets.Select(r => new PackageReferenceSet(r)));
            }
        }
Ejemplo n.º 3
0
        private void CheckConflictsWithFile(FileSystemInfo file)
        {
            if (file.IsDirectory())
            {
                List <string> childFiles = ListFiles(file);
                Conflicts.AddRange(childFiles);
            }
            else
            {
                FileSystemInfo parent = Directory.GetParent(file.FullName);
                if (parent == null)
                {
                    return;
                }

                while (!parent.Equals(_root))
                {
                    if (parent.IsDirectory())
                    {
                        break;
                    }

                    if (parent.IsFile())
                    {
                        Conflicts.Add(Repository.StripWorkDir(_root, parent));
                        break;
                    }

                    parent = Directory.GetParent(parent.FullName);
                    if (parent == null)
                    {
                        return;
                    }
                }
            }
        }