public static IODoc LoadObj() { IODoc pDoc; XmlSerializer xmlSerializer = new XmlSerializer(typeof(IODoc)); FileStream fsReader = null; try { fsReader = File.OpenRead(@".//Parameter/IODoc" + ".xml"); pDoc = (IODoc)xmlSerializer.Deserialize(fsReader); fsReader.Close(); pDoc.m_InputDictionary = pDoc.m_InputDataList.ToDictionary(p => p.strIOName); pDoc.m_OutputDictionary = pDoc.m_OutputDataList.ToDictionary(p => p.strIOName); } catch (Exception eMy) { if (fsReader != null) { fsReader.Close(); } pDoc = new IODoc(); } return(pDoc); }
static public void LoadData() { IODoc = IODoc.LoadObj(); }