public static ParameterContainer LoadParametersFromClientProfile( string configurationName) { ParameterContainer parameters = new ParameterContainer(); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(VirtualFolders.GetFileContent(BasePath.Name + "Parameters/ClientProfile.xml")); ParameterLoader.LoadParametersInto("ClientProfiles/" + xmlDocument.ChildNodes[0].Attributes["Value"].InnerText + "/" + configurationName + ".xml", parameters); return(parameters); }
public static void LoadParametersInto(string fileFullName, ParameterContainer parameters) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(VirtualFolders.GetFileContent(BasePath.Name + "Parameters/" + fileFullName)); foreach (XmlNode childNode1 in xmlDocument.FirstChild.ChildNodes) { if (childNode1.Name == "Parameters") { foreach (XmlNode childNode2 in childNode1.ChildNodes) { string innerText = childNode2.Attributes["Name"].InnerText; string str1; string str2; string str3 = !ParameterLoader.TryGetFromFile(childNode2, out str1) ? (!ParameterLoader.TryGetFromEnvironment(childNode2, out str2) ? (childNode2.Attributes["DefaultValue"] == null ? childNode2.Attributes["Value"].InnerText : childNode2.Attributes["DefaultValue"].InnerText) : str2) : str1; parameters.AddParameter(innerText, str3, true); } } } }
public ParameterFile(string path) { this.ParameterContainer = new ParameterContainer(); this.Path = path; this.LastCheckedTime = DateTime.MinValue; }