public void SetValueString(string variableName, string s) { SourceVariable v = Plan.Variables.FirstOrDefault(i => i.Name == variableName); if (v != null && s != "System.Double[]") { object value = string.IsNullOrEmpty(s) ? null : DataFuncs.DeserializeValue(v.Type, s); SetValueAcrossSteps(variableName, value); } }
private VariableContext CreateVariebleContext() { VariableContext vc = MathyLanguageService.CreateVariableContext(); foreach (SourceVariable variable in plan.Variables) { vc.Set(variable.Name, DataFuncs.CreateDefaultValue(variable.Type)); } return(vc); }