Beispiel #1
0
        public MobileApplication FactoryMethod(AllMobileOs osType)
        {
            MobileApplication ma = null;

            switch (osType)
            {
            case AllMobileOs.AndroidOs:
                ma = new AndroidOS();
                break;

            case AllMobileOs.IphoneOs:
                ma = new IphoneOS();
                break;

            case AllMobileOs.WindowsOs:
                ma = new WindowsOS();
                break;
            }
            return(ma);
        }
Beispiel #2
0
        public MobileApplication FactoryMethod(AllMobileOs osType)//iphone
        {
            MobileApplication ma = null;

            switch (osType)
            {
            case AllMobileOs.android:
                ma = new AndroidOS();
                break;

            case AllMobileOs.iphone:
                ma = new IPhoneOS();
                break;

            case AllMobileOs.windows:
                ma = new WindowsOS();
                break;
            }
            return(ma);
        }