Esempio n. 1
0
        static void Main()
        {
            string sectionDivider = "---------------------------------------- ";

            //Create an instance of AvroSample Class and invoke methods
            //illustrating different serializing approaches
            AvroSample Sample = new AvroSample();

            //Serialization to memory using Reflection
            Sample.SerializeDeserializeObjectUsingReflection();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization to memory using Generic Record
            Sample.SerializeDeserializeObjectUsingGenericRecords();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization using Reflection to Avro Object Container File
            Sample.SerializeDeserializeUsingObjectContainersReflection();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization using Generic Record to Avro Object Container File
            Sample.SerializeDeserializeUsingObjectContainersGenericRecord();

            Console.WriteLine(sectionDivider);
            Console.WriteLine("Press any key to exit.");
            Console.Read();
        }
        static void Main()
        {
            
            string sectionDivider = "---------------------------------------- ";
            
            //Create an instance of AvroSample Class and invoke methods
            //illustrating different serializing approaches
            AvroSample Sample = new AvroSample();

            //Serialization to memory using Reflection
            Sample.SerializeDeserializeObjectUsingReflection();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization to memory using Generic Record
            Sample.SerializeDeserializeObjectUsingGenericRecords();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization using Reflection to Avro Object Container File
            Sample.SerializeDeserializeUsingObjectContainersReflection();

            Console.WriteLine(sectionDivider + "\n");

            //Serialization using Generic Record to Avro Object Container File
            Sample.SerializeDeserializeUsingObjectContainersGenericRecord();

            Console.WriteLine(sectionDivider);
            Console.WriteLine("Press any key to exit.");
            Console.Read();
        }