コード例 #1
0
        public ICupsManager GetCupsManager(int cupsSize)
        {
            ICupsManager cupsSizes = null;

            if (cupsSize == 1)
            {
                return(cupsSizes = new SmallCupManager());
            }
            else if (cupsSize == 2)
            {
                return(cupsSizes = new MeduimCupManager());
            }
            return(cupsSizes);
        }
コード例 #2
0
        public override ICupsManager Create()
        {
            var meduimCups = new MeduimCupManager();

            return(meduimCups);
        }