Beispiel #1
0
        public Dictionary <String, String> MapToExtendedProperties(String prefix = "AgeCriteria")
        {
            Dictionary <String, String> extendedProperties = new Dictionary <String, String> ();


            extendedProperties.Add(prefix + ".UseAgeCriteria", UseAgeCriteria.ToString());

            extendedProperties.Add(prefix + ".AgeMinimum", AgeMinimum.ToString());

            extendedProperties.Add(prefix + ".AgeMaximum", AgeMaximum.ToString());

            extendedProperties.Add(prefix + ".AgeQualifierInt32", ((Int32)AgeQualifier).ToString());


            return(extendedProperties);
        }
        public override System.Xml.XmlDocument XmlSerialize()
        {
            System.Xml.XmlDocument document = base.XmlSerialize();

            System.Xml.XmlNode propertiesNode = document.ChildNodes[1].ChildNodes[0];


            #region Properties

            CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "GenderInt32", ((Int32)Gender).ToString());

            CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "Gender", Gender.ToString());

            CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "UseAgeCriteria", UseAgeCriteria.ToString());

            if (useAgeCriteria)
            {
                CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "AgeMinimum", AgeMinimum.ToString());

                CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "AgeMaximum", AgeMaximum.ToString());
            }

            if (ethnicityId != 0)
            {
                CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "EthnicityId", EthnicityId.ToString());

                CommonFunctions.XmlDocumentAppendPropertyNode(document, propertiesNode, "Ethnicity", EthnicityName);
            }

            #endregion


            return(document);
        }