Example #1
0
        /// <summary>
        /// The PopulateMetadata method populates the metadata properties
        /// in an XmlDictionary instance with the corresponding entries from
        /// an instance of a VersaFix dictionary.
        /// </summary>
        /// <param name="source">
        /// The source dictionary for the elements being copied.
        /// </param>
        /// <param name="target">
        /// The target dictionary for the elements to be copied into.
        /// </param>
        private static void PopulateMetadata(FixDictionary source, XmlDictionary target)
        {
            foreach (string key in source.Properties.Keys)
            {
                // REC: Construct an XML representation of the property
                // and add it to the target dictionary:
                XmlFixDxProperty xmlProperty = new XmlFixDxProperty();
                xmlProperty.Name  = key;
                xmlProperty.Value = source.Properties[key];

                target.Properties.Elements.Add(xmlProperty);
            }
        }
Example #2
0
        /// <summary>
        /// The PopulateMetadata method populates the metadata properties
        /// in an XmlDictionary instance with the corresponding entries from
        /// an instance of a VersaFix dictionary.
        /// </summary>
        /// <param name="source">
        /// The source dictionary for the elements being copied.
        /// </param>
        /// <param name="target">
        /// The target dictionary for the elements to be copied into.
        /// </param>
        private static void PopulateMetadata(FixDictionary source, XmlDictionary target)
        {
            foreach (string key in source.Properties.Keys)
            {
                // REC: Construct an XML representation of the property
                // and add it to the target dictionary:
                XmlFixDxProperty xmlProperty = new XmlFixDxProperty();
                xmlProperty.Name = key;
                xmlProperty.Value = source.Properties[key];

                target.Properties.Elements.Add(xmlProperty);
            }
        }