コード例 #1
0
        /// <summary>
        /// 向缓存中登记一个新的设备状态信息
        /// </summary>
        /// <param name="property">设备集合状态</param>
        /// <param name="EndTime">过期时限</param>
        /// <returns>返回0为成功,其它为错误值</returns>
        public int AddDeviceCache(string deviceKey, DeviceResponse deviceResponse, DateTime EndTime)
        {
            bool bFlag = mc.AddObject(deviceKey, deviceResponse, EndTime);

            if (bFlag)
            {
                return(0);
            }
            else
            {
                return((int)CodeEnum.ApplicationErr);
            }
        }