public int AddDefineTag(string tagName, AdvTagType tagType) { if (AdditionalStatusTags.ContainsKey(tagName)) { throw new ArgumentException("This tag name as been already added."); } AdditionalStatusTags.Add(tagName, tagType); return(AdditionalStatusTags.Count - 1); }
public AdvStatusSection(BinaryReader reader) { byte version = reader.ReadByte(); if (version >= 1) { byte count = reader.ReadByte(); for (int i = 0; i < count; i++) { string tagName = reader.ReadAsciiString256(); AdvTagType tagType = (AdvTagType)reader.ReadByte(); m_TagDefinitions.Add(new AdvTagDefinition() { Name = tagName, Type = tagType }); } } }