/// <summary> /// The PopulateBlocks method populates the blocks section /// of the supplied XML dictionary with the corresponding /// elements from the supplied FixDictionary instance. /// </summary> /// <param name="xmlDictionary"> /// The XmlDictionary instance that is to be populated. /// </param> /// <param name="fixDictionary"> /// The FixDictionary instance that is the source of the /// elements the XmlDictionary is to be populated with. /// </param> private static void PopulateBlocks(XmlDictionary xmlDictionary, FixDictionary fixDictionary) { foreach (FixDxBlock dxBlock in fixDictionary.Blocks) { XmlFixDxBlock xmlBlock = new XmlFixDxBlock(); xmlBlock.Name = dxBlock.Name; xmlBlock.Type = dxBlock.Type.ToString(); xmlBlock.Field = dxBlock.Field; xmlBlock.Elements = TranslateElements(dxBlock.Elements).Elements; xmlDictionary.Blocks.Entries.Add(xmlBlock); } }