/// <summary> /// Initializes a new instance of the <see cref="Project"/> class. /// </summary> public Project() { _tasks = new TasksList(); _triggers = new TriggersList( ); _publishers = new PublishersList( ); _externalLinks = new CloneableList <ExternalLink> (); _extensions = new CloneableList <ProjectExtension> (); _prebuild = new PrebuildsList( ); foreach (Type type in Util.ProjectExtensions) { this.ProjectExtensions.Add((ProjectExtension)Util.CreateInstanceOfType(type)); } }
/// <summary> /// Clones this instance. /// </summary> /// <returns></returns> public override SerializableList <PublisherTask> Clone( ) { PublishersList list = new PublishersList( ); foreach (PublisherTask item in this) { if (typeof(PublisherTask).GetType( ).GetInterface("System.ICloneable", true) != null) { ICloneable citem = item as ICloneable; if (citem != null) { list.Add(( PublisherTask )citem.Clone( )); } else { list.Add(( PublisherTask )citem); } } } return(list); }