Пример #1
0
        /// <summary>
        /// Parse and validate child TLV elements.
        /// </summary>
        /// <param name="childTags">Child TLV elements</param>
        private void ParseAndValidateChildTags(IEnumerable <ITlvTag> childTags)
        {
            TagCounter tagCounter = new TagCounter();

            foreach (ITlvTag tag in childTags)
            {
                if (tag == null)
                {
                    throw new ArgumentNullException(nameof(childTags));
                }

                _childTags.Add(ParseChild(tag) ?? tag);
                tagCounter[tag.Type]++;
            }

            Validate(tagCounter);
        }
Пример #2
0
 /// <summary>
 /// Validate the tag
 /// </summary>
 /// <param name="tagCounter"></param>
 protected virtual void Validate(TagCounter tagCounter)
 {
 }