protected Exclude(FileType parent, XmlElement element) : this(parent, element, parent.Type) { }
protected Exclude(FileType parent, string name, string path) : this(parent, name, path, parent.Type) { }
public Include(FileType parent, XmlElement element) : base(parent, element) { }
public Include(FileType parent, string name, string path) : base(parent, name, path) { }
protected override void LoadData(XmlElement element) { this.ID = new GameIdentifier(Game.Name, element); foreach (XmlAttribute attrib in element.Attributes) { if (GameIdentifier.attributes.Contains(attrib.Name)) continue; switch (attrib.Name) { case "virtualstore": IgnoreVirtualStore = attrib.Value == "ignore"; break; case "detect": DetectionRequired = attrib.Value == "required"; break; case "deprecated": IsDeprecated = Boolean.Parse(attrib.Value); break; default: throw new NotSupportedException(attrib.Name); } } Links.Clear(); foreach (XmlElement sub in element.ChildNodes) { switch (sub.Name) { case "title": _title = sub.InnerText; break; case "locations": this.Locations = new GameSaveInfo.Locations(this, sub); break; case "files": FileType type = new FileType(this, sub); FileTypes.Add(type.Type, type); break; case "ps_code": PlayStationIDs.Add(APlayStationID.Create(this, sub)); break; case "contributor": Contributors.Add(sub.InnerText); break; case "comment": Comment = sub.InnerText; break; case "restore_comment": RestoreComment = sub.InnerText; break; case "identifier": Identifiers.Add(new Identifier(this, sub)); break; case "scummvm": ScummVMs.Add(new ScummVM(this, sub)); break; case "linkable": Links.Add(new Link(this, sub)); break; case "registry": RegistryType rtype = new RegistryType(this, sub); RegistryTypes.Add(rtype.Type, rtype); break; default: throw new NotSupportedException(sub.Name); } } }
public FileType addFileType(string name) { if (String.IsNullOrEmpty(name)) name = ""; if (!this.FileTypes.ContainsKey(name)) { FileType type = new FileType(this, name); this.FileTypes.Add(name, type); this.XML.AppendChild(type.XML); } return this.FileTypes[name]; }