/// <summary> /// Save the parameters. /// </summary> public static void SaveParameters(ServiceParametersList parametersList) { string filepath = GetFilePath(parametersList.ServiceProvider); try { XmlDocument xmlDoc = new XmlDocument(); XmlNode rootNode = xmlDoc.CreateElement("Blackwood"); xmlDoc.AppendChild(rootNode); foreach (var parameter in parametersList.ParametersList) { XmlNode userNode = xmlDoc.CreateElement(parameter.ParameterName); if (parameter.ParameterName.Equals("username", StringComparison.CurrentCultureIgnoreCase)) { parameter.ParameterValue = parameter.ParameterValue.ToUpper(); } userNode.InnerText = parameter.ParameterValue; rootNode.AppendChild(userNode); } xmlDoc.Save(filepath); } catch (Exception exception) { Logger.Error(exception, _type.FullName, "ReadParameters"); } }
/// <summary> /// Save parameters call received /// </summary> /// <param name="parametersList"></param> private void SaveParameterCall(ServiceParametersList parametersList) { ProvierParameterReader.SaveParameters(parametersList); }