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 bool InitializeDataStoreItem() { _dataStoreCondition = new DataStoreCondition(); if (_dataStoreCondition.InitializeConditionList(_parentDataStoreManager, _dataStoreConfig.StoreCondition) == false) { return(false); } _tableNamePrefix = $"[{_dataStoreConfig.DeviceCode}]-[{_dataStoreConfig.TableInfo.TableName}]"; //增加需要读取的TagName for (int i = 0; i < _dataStoreConfig.TableInfo.FieldList.Length; i++) { _parentDataStoreManager.InsertTagName(_dataStoreConfig.TableInfo.FieldList[i].TagName); } return(true); }