public static List <ValueMark> GetValidValues(AgentType agentType, string agentFullname, int frame) { Debug.Check(!string.IsNullOrEmpty(agentFullname) && frame > -1); List <ValueMark> valueSet = new List <ValueMark>(); if (_agentDatabase.ContainsKey(agentFullname)) { AgentData agentData = _agentDatabase[agentFullname]; // Properties if (agentType != null) { //foreach (PropertyDef p in agentType.GetProperties()) //{ // ValueMark value = agentData.GetValidValue(p.BasicName, frame); // if (value != null) // valueSet.Add(value); //} foreach (string valueName in agentData.ValueSet.Keys) { ValueMark value = agentData.GetValidValue(valueName, frame); if (value != null) { valueSet.Add(value); } } } } return(valueSet); }
public static List <ValueMark> GetValidValues(Nodes.Node node, AgentType agentType, string agentFullname, int frame) { Debug.Check(!string.IsNullOrEmpty(agentFullname) && frame > -1); List <ValueMark> valueSet = new List <ValueMark>(); if (_agentDatabase.ContainsKey(agentFullname)) { AgentData agentData = _agentDatabase[agentFullname]; // Properties if (agentType != null) { foreach (PropertyDef p in agentType.GetProperties()) { ValueMark value = agentData.GetValidValue(p.Name, frame); if (value != null) { valueSet.Add(value); } } } // Par if (node != null) { foreach (ParInfo par in node.Pars) { ValueMark value = agentData.GetValidValue(par.Name, frame); if (value != null) { valueSet.Add(value); } } } } return(valueSet); }
public static ValueMark GetValidValue(string agentFullname, string valueName, int frame) { Debug.Check(!string.IsNullOrEmpty(agentFullname) && !string.IsNullOrEmpty(valueName) && frame > -1); if (!_agentDatabase.ContainsKey(agentFullname)) { return(null); } AgentData agentData = _agentDatabase[agentFullname]; return(agentData.GetValidValue(valueName, frame)); }