Ejemplo n.º 1
0
        public static SpinerBaseConfig Load(String p_path)
        {
            SpinerBaseConfig objReturn;
            String           strFile;
            StreamReader     objFile;

            try
            {
                objReturn = null;

                if (!File.Exists(p_path))
                {
                    new SpinerBaseConfig().Save(p_path);
                }

                objFile = new StreamReader(p_path);
                strFile = objFile.ReadToEnd();
                objFile.Close();
                objFile.Dispose();
                objFile   = null;
                objReturn = SpinerBaseConfig.Deserialize(strFile);

                return(objReturn);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
 public SpinerBaseConfig Clone()
 {
     try
     {
         return(SpinerBaseConfig.Deserialize(Serialize()));
     }
     catch (Exception)
     {
         throw;
     }
 }