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

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

            return(plc);
        }