示例#1
0
        public AFP_ITake GetOutLens()
        {
            AFP_ITake re = Lens;

            Lens = null;
            return(re);
        }
示例#2
0
        public override bool PutInLens(AFP_ITake iTake)
        {
            if (!(iTake is AFP_HoLens holens))
            {
                return(false);
            }

            Lens = iTake;
            return(true);
        }
示例#3
0
        private void TestUsingFactory()
        {
            AFP_Camere camera = null;
            AFP_ITake  lens   = null;

            foreach (AFP_IMakeCamera factory in factories)
            {
                camera = factory.MakeCamera();
                lens   = factory.MakeLens();
                TestCase(camera, lens); // 호환성 테스트
            }
        }
示例#4
0
 private void TestCase(AFP_Camere camera, AFP_ITake lens)
 {
     Console.WriteLine("Test");
     if (camera.PutInLens(lens) == false)
     {
         Console.WriteLine("Lens not setted in camera");
     }
     if (camera.TakeAPicture() == false)
     {
         Console.WriteLine("Picture has not taken");
     }
 }
示例#5
0
 public AFP_Camere()
 {
     Lens = null;
 }
示例#6
0
 public abstract bool PutInLens(AFP_ITake iTake);