예제 #1
0
        public Storage(int length)
        {
            this._capacidad = length;

            this.RutaArchivo = @"C:\Users\jmpit\Desktop\javier.Martin.Pitameglia.Evaluacion\Serializado";


            this._cajon = new List <T>();

            Type[] Tipo = new Type[1];

            Tipo[0] = typeof(T);


            File = new XMLfile <Storage <T> >(this.RutaArchivo);
        }
        public IActionResult ReviewXML()
        {
            //construct path to search for XML files
            string RootDir   = Environment.CurrentDirectory.ToString();
            string OutputDir = RootDir + "/output/";

            //get the XML files in the specified location
            string[] XMLfiles;
            XMLfiles = System.IO.Directory.GetFiles(OutputDir, "*.xml");

            //clean up the file path information for display on the view
            foreach (string XMLfile in XMLfiles)
            {
                int i = Array.IndexOf(XMLfiles, XMLfile);
                XMLfiles[i] = XMLfile.Split("/")[2];
            }

            //set the view data and return the view
            ViewData["FileArray"] = XMLfiles;

            return(View());
        }