private void CopyInterpreterToAttributes(InteractiveInterpreter interpreter, IActionContext context) { IDictionaryEnumerator configEnum; configEnum=context.GetConfiguration().GetEnumerator(); while(configEnum.MoveNext()) { DictionaryEntry property; property = (DictionaryEntry)configEnum.Current; if (!property.Key.Equals("script")) { object attributeValue = context.GetAttribute((String)property.Key); object interpreterValue = interpreter.GetValue((String)property.Key); // Change the attribute only if the value changed and is marked for copying if (!property.Key.Equals("script") && attributeValue != null && ! attributeValue.Equals(interpreterValue) && property.Value.ToString().IndexOf("Out")!=-1 ) { if (log.IsDebugEnabled) { log.Debug("copy from <-interpreter key:"+property.Key+" oldvalue:"+attributeValue+ " newvalue:"+interpreterValue); } context.SetAttribute((String)property.Key,interpreterValue); } } } }
private void CopyInterpreterToAttributes(InteractiveInterpreter interpreter, IActionContext context) { IDictionaryEnumerator configEnum; configEnum = context.GetConfiguration().GetEnumerator(); while (configEnum.MoveNext()) { DictionaryEntry property; property = (DictionaryEntry)configEnum.Current; if (!property.Key.Equals("script")) { object attributeValue = context.GetAttribute((String)property.Key); object interpreterValue = interpreter.GetValue((String)property.Key); // Change the attribute only if the value changed and is marked for copying if (!property.Key.Equals("script") && attributeValue != null && !attributeValue.Equals(interpreterValue) && property.Value.ToString().IndexOf("Out") != -1) { if (log.IsDebugEnabled) { log.Debug("copy from <-interpreter key:" + property.Key + " oldvalue:" + attributeValue + " newvalue:" + interpreterValue); } context.SetAttribute((String)property.Key, interpreterValue); } } } }
public void Run(IActionContext actionContext) { actionContext.SetAttribute("available", Evaluation.DISAPPROVE); }
public void Run(IActionContext actionContext) { actionContext.SetAttribute("the text attrib", ":("); }
public void Run(IActionContext actionContext) { actionContext.SetAttribute("available",Evaluation.DISAPPROVE); }
public void Run(IActionContext actionContext) { actionContext.SetAttribute("the text attrib",":("); }