Пример #1
0
        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);
        }
Пример #2
0
 public static void LoadObj()
 {
     docIO = IODoc.LoadObj();
 }