コード例 #1
0
        public LiveBrewCommandDispatcher GetLiveBrewCommandDispatcher(string fieldSection)
        {
            switch (fieldSection)
            {
            case "Weigh bin Mash Copper":
            case "MASH COPPER":
                liveBrewCommandDispatcher = MashCopperCommandDispatcher.GetInstance();
                break;

            case "WEIGHBIN MASHTUN":
            case "MASH TUN":
                liveBrewCommandDispatcher = MashTunCommandDispatcher.GetInstance();
                break;

            case "MASH FILTER":
                liveBrewCommandDispatcher = MashFilterCommandDispatcher.GetInstance();
                break;

            case "HOLDING VESSEL":
            case "HOLDING VESSEL TO WORT COPPER":
                liveBrewCommandDispatcher = HoldingVesselCommandDispatcher.GetInstance();
                break;

            case "WORT COPPER":
                liveBrewCommandDispatcher = WortCopperCommandDispatcher.GetInstance();
                break;

            case "WHIRLPOOL":
                liveBrewCommandDispatcher = WhirlpoolCommandDispatcher.GetInstance();
                break;
            }

            return(liveBrewCommandDispatcher);
        }
コード例 #2
0
        //lazy construction of instance
        public static HoldingVesselCommandDispatcher GetInstance()
        {
            if (_uniqueInstance == null)
            {
                _uniqueInstance = new HoldingVesselCommandDispatcher();
            }

            return(_uniqueInstance);
        }