/// <summary>
        /// Adds the <paramref name="record"/> as a child.
        /// </summary>
        /// <param name="frhi">The <see cref="FileRecordHierarchyItem"/> configuration.</param>
        /// <param name="record">The <see cref="FileRecord"/>.</param>
        /// <returns>The corresponding <see cref="FileRecordHierarchyLinker"/>.</returns>
        public FileRecordHierarchyLinker AddChild(FileRecordHierarchyItem frhi, FileRecord record)
        {
            var list = GetChildList(record.RecordIdentifier);
            var item = new FileRecordHierarchyLinker(frhi, this, list.Count);

            list.Add(item);
            return(item);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="FileRecordHierarchyLinker"/> class.
        /// </summary>
        /// <param name="frhi">The <see cref="FileRecordHierarchyLinker"/>.</param>
        /// <param name="parent">The parent <see cref="FileRecordHierarchyLinker"/>.</param>
        /// <param name="index">The <see cref="Index"/> for the record.</param>
        internal FileRecordHierarchyLinker(FileRecordHierarchyItem frhi, FileRecordHierarchyLinker parent, int index)
        {
            RecordIdentifier = frhi.RecordIdentifier;
            Parent           = parent;
            Index            = index;

            foreach (var child in frhi.Children)
            {
                _children.Add(child.Key, new List <FileRecordHierarchyLinker>());
            }
        }