Exemplo n.º 1
0
        /// <summary>
        /// The PopulateEnums method populates the enumerations
        /// section of the supplied XmlDictionary with all the
        /// enumerations from the supplied FixDictionary.
        /// </summary>
        /// <param name="xmlDictionary">
        /// The XmlDictionary instance being 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 PopulateEnums(XmlDictionary xmlDictionary, FixDictionary fixDictionary)
        {
            foreach (FixDxEnumeration dxEnumeration in fixDictionary.Enums)
            {
                XmlFixDxEnumeration xmlEnumeration = new XmlFixDxEnumeration();
                xmlEnumeration.Name = dxEnumeration.Name;
                foreach (FixDxEnumerator dxEnumerator in dxEnumeration.Enumerators)
                {
                    XmlFixDxEnumerator xmlEnumerator = new XmlFixDxEnumerator();
                    xmlEnumerator.value       = dxEnumerator.Value;
                    xmlEnumerator.Description = dxEnumerator.Description;
                    xmlEnumeration.Enumerators.Add(xmlEnumerator);
                }

                xmlDictionary.Enums.Entries.Add(xmlEnumeration);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The PopulateEnums method populates the enumerations
        /// section of the supplied XmlDictionary with all the
        /// enumerations from the supplied FixDictionary.
        /// </summary>
        /// <param name="xmlDictionary">
        /// The XmlDictionary instance being 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 PopulateEnums(XmlDictionary xmlDictionary, FixDictionary fixDictionary)
        {
            foreach (FixDxEnumeration dxEnumeration in fixDictionary.Enums)
            {
                XmlFixDxEnumeration xmlEnumeration = new XmlFixDxEnumeration();
                xmlEnumeration.Name = dxEnumeration.Name;
                foreach (FixDxEnumerator dxEnumerator in dxEnumeration.Enumerators)
                {
                    XmlFixDxEnumerator xmlEnumerator = new XmlFixDxEnumerator();
                    xmlEnumerator.value = dxEnumerator.Value;
                    xmlEnumerator.Description = dxEnumerator.Description;
                    xmlEnumeration.Enumerators.Add(xmlEnumerator);
                }

                xmlDictionary.Enums.Entries.Add(xmlEnumeration);
            }
        }