/// <summary> /// Adds the given sub-record to the record. /// </summary> /// <param name="br">The record to add.</param> public override void AddRecord(BaseRecord br) { SubRecord sr = br as SubRecord; if (sr == null) throw new TESParserException("Record to add was not of the correct type." + Environment.NewLine + "Records can only hold Subrecords."); SubRecords.Add(sr); }
/// <summary> /// Adds the given sub-record to the record. /// </summary> /// <param name="br">The record to add.</param> public override void AddRecord(BaseRecord br) { Rec r = br as Rec; if (r == null) throw new TESParserException("Record to add was not of the correct type." + Environment.NewLine + "Groups can only hold records or other groups."); Records.Add(r); }
/// <summary> /// Deletes the specified sub-record from the record. /// </summary> /// <param name="br">The record to delete.</param> public override void DeleteRecord(BaseRecord br) { SubRecord sr = br as SubRecord; if (sr == null) return; SubRecords.Remove(sr); }
/// <summary> /// Deletes the specified sub-record from the record. /// </summary> /// <param name="br">The record to delete.</param> public override void DeleteRecord(BaseRecord br) { Rec r = br as Rec; if (r == null) return; Records.Remove(r); }
/// <summary> /// Adds the given sub-record to the record. /// </summary> /// <param name="br">The record to add.</param> public abstract void AddRecord(BaseRecord br);
/// <summary> /// Deletes the specified sub-record from the record. /// </summary> /// <param name="br">The record to delete.</param> public abstract void DeleteRecord(BaseRecord br);
/// <summary> /// Adds the given sub-record to the record. /// </summary> /// <param name="br">The record to add.</param> public override void AddRecord(BaseRecord br) { throw new TESParserException("Subrecords cannot contain additional data."); }
/// <summary> /// Deletes the specified sub-record from the record. /// </summary> /// <param name="br">The record to delete.</param> public override void DeleteRecord(BaseRecord br) { }