TESVSnip.Domain.Model.GroupRecord.AddRecords C# (CSharp) Method

AddRecords() public method

public AddRecords ( IEnumerable br ) : void
br IEnumerable
return void
        public override void AddRecords(IEnumerable<BaseRecord> br)
        {
            if (br.Count(r => !(r is Record || r is GroupRecord)) > 0)
            {
                throw new TESParserException("Record to add was not of the correct type.\nGroups can only hold records or other groups.");
            }

            foreach (var r in br)
            {
                r.Parent = this;
            }

            this.records.AddRange(br.OfType<Rec>());
            FireRecordListUpdate(this, this);
        }