public static IODoc LoadObj() { IODoc pDoc = null; XmlSerializer xml = new XmlSerializer(typeof(IODoc)); FileStream fs = null; try { fs = File.OpenRead(@".//Parameter/IO/IODoc.xml"); pDoc = (IODoc)xml.Deserialize(fs); fs.Close(); pDoc.dicInput = pDoc.listInput.ToDictionary(p => p.Name); pDoc.dicOutput = pDoc.listOutput.ToDictionary(p => p.Name); } catch //(Exception ex) { if (null != fs) { fs.Close(); } pDoc = new IODoc(); } return(pDoc); }
public static void LoadObj() { docIO = IODoc.LoadObj(); }