/// <summary> /// The PopulateFields method populates the fields section /// of an XmlDictionary instance with the field definitions /// from the supplied FixDictionary instance. /// </summary> /// <param name="xmlDictionary"> /// The XmlDictinary instance that the field definitions /// are to be added to. /// </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 PopulateFields(XmlDictionary xmlDictionary, FixDictionary fixDictionary) { foreach (FixDxField dxField in fixDictionary.Fields) { XmlFixDxField xmlField = new XmlFixDxField(); xmlField.Tag = dxField.Tag; xmlField.Name = dxField.Name; xmlField.Type = dxField.Type; xmlField.Enumeration = dxField.Enumeration; if (dxField.LengthCoded == true) { xmlField.LengthField = dxField.LengthField.ToString(); } else { xmlField.LengthField = null; } xmlDictionary.Fields.Entries.Add(xmlField); } }