Exemple #1
0
		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);
					}
				}
			}
		}
Exemple #2
0
        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);
                    }
                }
            }
        }
Exemple #3
0
        public IDictionary CollectResults(IProcessInvocationContext processInvocationContext)
        {
            IActionContext subProcessContext = processInvocationContext.GetInvokedProcessContext();

            IDictionary pregnancyAttributes = new Hashtable();

            log.Debug("collecting results ! ");
            pregnancyAttributes["holiday approval"] = subProcessContext.GetAttribute("evaluation result");

            return(pregnancyAttributes);
        }
Exemple #4
0
		private void CopyAttributesToInterpreter(InteractiveInterpreter interpreter,
												IActionContext context)
		{
			IDictionaryEnumerator configEnum;
			configEnum=context.GetConfiguration().GetEnumerator();
			while(configEnum.MoveNext())
			{
				DictionaryEntry property;
				property = (DictionaryEntry)configEnum.Current;
				if (!property.Key.Equals("script") && property.Value.ToString().IndexOf("In")!=-1)
				{
					object attributeValue;
					attributeValue = context.GetAttribute((String)property.Key);
					if (log.IsDebugEnabled)
					{
						log.Debug("copy to ->interpreter key:"+property.Key+" value:"+attributeValue);
					}
					interpreter.SetValue((String)property.Key,attributeValue);
				}
			}
		}
Exemple #5
0
        private void CopyAttributesToInterpreter(InteractiveInterpreter interpreter,
                                                 IActionContext context)
        {
            IDictionaryEnumerator configEnum;

            configEnum = context.GetConfiguration().GetEnumerator();
            while (configEnum.MoveNext())
            {
                DictionaryEntry property;
                property = (DictionaryEntry)configEnum.Current;
                if (!property.Key.Equals("script") && property.Value.ToString().IndexOf("In") != -1)
                {
                    object attributeValue;
                    attributeValue = context.GetAttribute((String)property.Key);
                    if (log.IsDebugEnabled)
                    {
                        log.Debug("copy to ->interpreter key:" + property.Key + " value:" + attributeValue);
                    }
                    interpreter.SetValue((String)property.Key, attributeValue);
                }
            }
        }