예제 #1
0
        public bool ISetDataVal(string name, object val)
        {
            var  ret = true;
            bool result;

            if (!DataAreaList.ContainsKey(name))
            {
                result = false;
            }
            else
            {
                lock (_wobiLock)
                {
                    DataAreaList[name].DataVal        = val;
                    DataAreaList[name].DataUpdateFlag = true;
                    DataAreaUptateFlag = true;
                }

                var singleObj = new DataObjInfo();
                singleObj.DataName = name;
                singleObj.Context  = DataAreaList[name].DataVal;
                singleObj.Type     = DataAreaList[name].DataType;
                if (OnDataAreaSingleObjRefresh != null)
                {
                    OnDataAreaSingleObjRefresh(singleObj);
                }
                result = ret;
            }

            return(result);
        }
예제 #2
0
        public bool IClearDataInfo()
        {
            var ret = true;

            lock (_wobiLock)
            {
                DataAreaList.Clear();
            }

            return(ret);
        }
예제 #3
0
        public bool IAddDataInfo(DataInfo item)
        {
            var ret = true;

            lock (_wobiLock)
            {
                DataAreaList.Add(item.DataName, item);
            }

            return(ret);
        }
예제 #4
0
        public DataInfo IGetDataInfo(string name)
        {
            DataInfo result;

            if (!DataAreaList.ContainsKey(name))
            {
                result = null;
            }
            else
            {
                var info = DataAreaList[name];
                result = info;
            }

            return(result);
        }