示例#1
0
        static void Main(string[] args)
        {
            var memoryCard = new MemoryCard();
            var cardReader = new CardReader(memoryCard);

            cardReader.ConnectWithUsbCabel();
        }
示例#2
0
        static void Main(string[] args)
        {
            // Now this class is laptop, in future it may be a mediaplayer or mobile devise
            ILaptop laptop = new CardReader();
            Laptop  client = new Laptop(laptop);

            client.PlayAlbums();

            Console.Read();
        }
示例#3
0
 static void Main(string[] args)
 {
     IUSBAdapter cardReader = new CardReader("sdcard");
     var         data       = cardReader.Read();
 }