private XElement GetXElementForPeriodicity(bool internalPurpose, AlertType type, AlertPeriod defaultVal) { if (AlertPeriodicity.ContainsKey(type)) { defaultVal = AlertPeriodicity[type]; } return(new XElement((internalPurpose ? "" : ConfigReader.S2CNS) + ("alertPeriod_" + type), defaultVal)); }
private void SetAlertPeriodicity(AlertPeriod defaultPeriod, AlertType type, bool internalPurpose, XElement xmlPref) { AlertPeriod period = defaultPeriod; xmlPref.ParseNode <AlertPeriod>("alertPeriod_" + type, ref period, internalPurpose); if (AlertPeriodicity.ContainsKey(type)) { AlertPeriodicity[type] = period; } else { AlertPeriodicity.Add(type, period); } }