Beispiel #1
0
        static void Main(string[] args)
        {
            CarsJSONAdaptee json = new CarsJSONAdaptee();
            CarsXMLAdapter  xml  = new CarsXMLAdapter();

            Program p = new Program(json);

            Console.WriteLine("json\n");
            Console.WriteLine(p.json.GetCarsJSON().ToString());

            p = new Program(xml);
            Console.WriteLine("\nxml\n");
            Console.WriteLine(p.xml.GetCarsXML().InnerXml);

            Console.ReadKey();
        }
Beispiel #2
0
 public Program(CarsXMLAdapter xml)
 {
     this.xml = xml;
 }