/// <summary> /// Sets the single return value of an expression. /// </summary> /// <param name="value">The expression return value in plain text.</param> public void SetSingleReturnValue(string value) { Debug.Assert(DestinationNameList.Count <= 1); ReturnValue = value; if (DestinationNameList.Count == 1) { FilledDestinationTable.Add(DestinationNameList[0].Name, null); } }
/// <summary> /// Sets results of an expression, with one of them the returned value. /// </summary> /// <param name="outgoingResultList">The list of results.</param> /// <param name="returnValueIndex">The expression return value in plain text.</param> public void SetMultipleResult(IList <string> outgoingResultList, int returnValueIndex) { for (int i = 0; i < outgoingResultList.Count; i++) { string OutgoingResult = outgoingResultList[i]; if (i != returnValueIndex) { CompleteDestinationNameList.Add(OutgoingResult); } else { ReturnValue = OutgoingResult; OutgoingResult = null; } if (i < DestinationNameList.Count) { FilledDestinationTable.Add(DestinationNameList[i].Name, OutgoingResult); } } ReturnValueIndex = returnValueIndex; }