public static ParameterContainer Load(string filename) { Guards.Guard.AgainstNullArgument("filename", filename); if (!File.Exists(filename)) { throw new FileNotFoundException("The text container file could not be found", filename); } string content = string.Empty; using (StreamReader r = new StreamReader(filename)) { content = r.ReadToEnd(); } currentParser = Parser ?? new XmlParameterContainerParser(); return(Parse(content)); }
public void Save(string filename) { currentParser = Parser ?? new XmlParameterContainerParser(); currentParser.Save(this, filename); }