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

            Program p = new Program(json);

            Console.WriteLine("=================JSON====================");
            Console.WriteLine(p._json.GetPersonListJSON().ToString());

            p = new Program(xml);
            Console.WriteLine("=================XML=====================");
            Console.WriteLine(p._xml.GetPersonXML().InnerXml);

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