示例#1
0
        private static void Main(string[] args)
        {
            Hole       hole       = new Hole(10);
            RoundThing roundThing = new RoundThing {
                Radius = 8
            };
            SquareThing squareThing = new SquareThing(10);

            hole.Fits(roundThing);
            hole.Fits(new SquareThingAdapter(squareThing));

            Console.ReadKey();
        }
示例#2
0
 public SquareThingAdapter(SquareThing squareThing)
 {
     _squareThing = squareThing;
 }