/// <summary> /// Gets the value of the specified symbol /// </summary> /// <param name="symbol">Symbol name</param> /// <returns> /// Null, if the symbol cannot be found; otherwise, the symbol's value /// </returns> public ExpressionValue GetSymbolValue(string symbol) { if (ParameterNames.Contains(symbol.ToUpperInvariant())) { // TODO: Update to get the real symbol value during run time return(ExpressionValue.NonEvaluated); } return(TestSet.GetSymbolValue(symbol)); }
/// <summary> /// Gets the value of the specified symbol /// </summary> /// <param name="symbol">Symbol name</param> /// <returns> /// Null, if the symbol cannot be found; otherwise, the symbol's value /// </returns> public ExpressionValue GetSymbolValue(string symbol) { if (MachineContext == null || MachineContext.IsCompileTimeContext) { // --- We return a fake value for compile time check, provided // --- we know the parameter name if (TestCases.Count > 0 && ParameterNames.Contains(symbol.ToUpperInvariant())) { return(ExpressionValue.NonEvaluated); } } // --- During run time we use the standard symbol name resolution return(CurrentTestCaseIndex >= 1 && CurrentTestCaseIndex <= TestCases.Count ? TestCases[CurrentTestCaseIndex].GetSymbolValue(symbol) : TestSet.GetSymbolValue(symbol)); }