Пример #1
0
        public Proceso readFromDisk()
        {
            String       linea;
            Proceso      regresa = new Proceso();
            StreamReader sr      = new StreamReader(suspendedFile);

            linea = sr.ReadLine();
            var strs = linea.Split('|');

            regresa.setBloqueado(Int32.Parse(strs[0]));
            if (strs[1] == "True")
            {
                regresa.setError();
            }
            regresa.setEspera(Int32.Parse(strs[2]));
            regresa.setEstado(Int32.Parse(strs[3]));
            regresa.setFinalizacion(Int32.Parse(strs[4]));
            regresa.setID(strs[5]);
            regresa.setLlegada(Int32.Parse(strs[6]));
            regresa.setOpe(strs[7]);
            if (strs[8] == "True")
            {
                regresa.setPrimera();
            }
            regresa.setRespuesta(Int32.Parse(strs[9]));
            regresa.setResult(Int32.Parse(strs[10]));
            regresa.setServicio(Int32.Parse(strs[11]));
            regresa.setSize(Int32.Parse(strs[12]));
            regresa.setTime(Int32.Parse(strs[13]));
            regresa.setTrans(Int32.Parse(strs[14]));
            linea = sr.ReadToEnd();

            /*var rest = linea.Split('\n');
             * List<String> listaNueva = rest.OfType<String>().ToList();
             * listaNueva.RemoveAt(0);*/
            sr.Close();
            return(regresa);
        }