private Variable CheckExistingVariable(VariableRef variable) { Variable?varDesc = fVarResolver(variable); if (varDesc != null) { return(varDesc); } throw new Exception("Undefined variable: " + variable.ToString()); }
public void ValidateVariableValuesOrThrow(IList <VariableValue> values) { foreach (VariableValue value in values) { VariableRef varRef = value.Variable; if (!map.ContainsKey(varRef)) { throw new Exception("Invalid variable reference: " + varRef.ToString()); } } }