示例#1
0
        public bool InitializeConditionList(DataStoreManager parentDataStoreManager, string conditionJson)
        {
            _parentDataStoreManager = parentDataStoreManager;

            if (string.IsNullOrEmpty(conditionJson) == true)
            {
                _conditionList = new List <ConditionItem>();
                return(true);
            }
            else
            {
                try
                {
                    _conditionList = JsonConvert.DeserializeObject <List <ConditionItem> >(conditionJson);
                }
                catch
                {
                    return(false);
                }

                //增加需要读取的TagName
                for (int i = 0; i < _conditionList.Count; i++)
                {
                    _parentDataStoreManager.InsertTagName(_conditionList[i].ConditionTagName);
                }
            }



            return(true);
        }
 public DataSotreItem(DataStoreManager parentDataStoreManager,
                      DataStoreConfigInfo dataStoreConfig)
 {
     _dataStoreConfig        = dataStoreConfig;
     _parentDataStoreManager = parentDataStoreManager;
     //_dataStoreItemCnn = connString;
 }