Example #1
0
        protected Clase05Clase decodificarClase05(string s)
        {
            Clase05Clase cOut = new Clase05Clase();

            watch.Restart();
            Decodificador05A dec5A = new Decodificador05A();

            for (int i = 0; i < this.veces; i++)
            {
                cOut = dec5A.decode(s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase A: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Decodificador05B dec5B = new Decodificador05B();

            for (int i = 0; i < this.veces; i++)
            {
                dec5B.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase B: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Type t = typeof(Fase02.Clase05Clase);

            for (int i = 0; i < this.veces; i++)
            {
                Clase05Clase aux = (Clase05Clase)s.decodificar(t);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase C: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            for (int i = 0; i < this.veces; i++)
            {
                SerializerStatic.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con atributo Struct D: " + watch.ElapsedMilliseconds + " milisegundos");

            return(cOut);
        }
        protected Clase05Clase decodificarClase05(string s)
        {
            Clase05Clase cOut = new Clase05Clase();

            watch.Restart();
            Decodificador05A dec5A = new Decodificador05A();
            for (int i = 0; i < this.veces; i++)
            {
                cOut = dec5A.decode(s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase A: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Decodificador05B dec5B = new Decodificador05B();
            for (int i = 0; i < this.veces; i++)
            {
                dec5B.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase B: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Type t = typeof(Fase02.Clase05Clase);
            for (int i = 0; i < this.veces; i++)
            {
                Clase05Clase aux = (Clase05Clase)s.decodificar(t);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con miembro de clase C: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            for (int i = 0; i < this.veces; i++)
            {
                SerializerStatic.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación clase con atributo Struct D: " + watch.ElapsedMilliseconds + " milisegundos");

            return cOut;
        }