public void Load(Stream inStream, TagContext context) { if (!inStream.CanRead) { return; } if (!inStream.CanSeek) { return; } blocks.Clear(); using (BinaryReader reader = new BinaryReader(inStream)) { BlockName = reader.ReadUTF8NullTerminated(); Count = reader.ReadInt32(); for (int i = 0; i < Count; i++) { Block block = context.CreateBlock(BlockName); block.Read(reader); blocks.Add(block); } } }
public AbideTagGroup(Group group, TagContext context) : base(context) { this.group = group ?? throw new ArgumentNullException(nameof(group)); foreach (var block in group.TagBlocks) { var b = new AbideTagBlock(context, this, block); TagBlocks.Add(b); b.PostprocessTagBlock(); } }
protected AbideTagObject(TagContext context, AbideTagObject owner) : this(context) { Owner = owner ?? throw new ArgumentNullException(nameof(owner)); }
protected AbideTagObject(TagContext context) { Context = context ?? throw new ArgumentNullException(nameof(context)); }