コード例 #1
0
        private void SaveConsecutiveFail(XmlDocument xmlDoc, ConsecutiveFailConfigData configData)
        {
            XmlOldConsecutiveFail xmlConsecutiveFail = new XmlOldConsecutiveFail();

            xmlConsecutiveFail.Enabled = configData.Enabled;
            xmlConsecutiveFail.Limit = configData.Threshold;
            xmlConsecutiveFail.ResetCounterOnEachRow = configData.ResetCounterOnEachRow;
            xmlConsecutiveFail.CustomRules = new List<ConsecutiveFailCustomRule>(configData.CustomRuleList);

            xmlConsecutiveFail.SaveConfig(xmlDoc);
        }
コード例 #2
0
        private void LoadConsecutiveFail(XmlDocument xmlDoc, ConsecutiveFailConfigData configData)
        {
            XmlOldConsecutiveFail xmlConsecutiveFail = new XmlOldConsecutiveFail();
            xmlConsecutiveFail.LoadConfig(xmlDoc);

            configData.Enabled = xmlConsecutiveFail.Enabled;
            configData.Threshold = xmlConsecutiveFail.Limit;
            configData.ResetCounterOnEachRow = xmlConsecutiveFail.ResetCounterOnEachRow;
            configData.ClearCustomRuleList();
            configData.AddRangeToCustomRuleList(xmlConsecutiveFail.CustomRules);
        }