Esempio n. 1
0
        public static MvaOmronPlcLdd GetOrCreate(string key)
        {
            if (!PlcMapper.ContainsKey(key))
            {
                PlcMapper[key] = new MvaOmronPlcLdd();
            }
            var plc = PlcMapper[key];

            return(plc);
        }
Esempio n. 2
0
        public static MvaOmronPlcLdd Create(string key)
        {
            if (PlcMapper.ContainsKey(key))
            {
                throw new Exception("PLC己經存在");
            }
            var plc = PlcMapper[key] = new MvaOmronPlcLdd();

            return(plc);
        }