void SetupScalarResult(CommonFunctions.WarewolfEvalResult warewolfEvalResult)
 {
     if (warewolfEvalResult.IsWarewolfAtomResult)
     {
         _scalarResult = warewolfEvalResult as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
     }
 }
 void SetupForWarewolfRecordSetResult(CommonFunctions.WarewolfEvalResult warewolfEvalResult)
 {
     if (warewolfEvalResult.IsWarewolfRecordSetResult)
     {
         var listResult = warewolfEvalResult as CommonFunctions.WarewolfEvalResult.WarewolfRecordSetResult;
         if (listResult != null)
         {
             var stringValue = "";
             foreach (var item in listResult.Item.Data)
             {
                 if (item.Key != EvaluationFunctions.PositionColumn)
                 {
                     var data = CommonFunctions.WarewolfEvalResult.NewWarewolfAtomListresult(item.Value) as CommonFunctions.WarewolfEvalResult.WarewolfAtomListresult;
                     var warewolfEvalResultToString = ExecutionEnvironment.WarewolfEvalResultToString(data);
                     if (string.IsNullOrEmpty(stringValue))
                     {
                         stringValue = warewolfEvalResultToString;
                     }
                     else
                     {
                         stringValue += "," + warewolfEvalResultToString;
                     }
                 }
             }
             _scalarResult = CommonFunctions.WarewolfEvalResult.NewWarewolfAtomResult(DataStorage.WarewolfAtom.NewDataString(stringValue)) as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
         }
     }
 }
 void SetupForWarewolfRecordSetResult(CommonFunctions.WarewolfEvalResult warewolfEvalResult)
 {
     if (warewolfEvalResult.IsWarewolfRecordSetResult && warewolfEvalResult is CommonFunctions.WarewolfEvalResult.WarewolfRecordSetResult listResult)
     {
         var stringValue = "";
         foreach (var item in listResult.Item.Data)
         {
             stringValue = SetupListResultItem(item);
         }
         _scalarResult = CommonFunctions.WarewolfEvalResult.NewWarewolfAtomResult(DataStorage.WarewolfAtom.NewDataString(stringValue)) as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
     }
 }
 void SetEvalResultAsObject(CommonFunctions.WarewolfEvalResult.WarewolfAtomResult x)
 {
     if (((DataStorage.WarewolfAtom.DataString)x.Item).Item == "true")
     {
         _evalResultAsObject = true;
     }
     else
     {
         if (((DataStorage.WarewolfAtom.DataString)x.Item).Item == "false")
         {
             _evalResultAsObject = false;
         }
     }
 }
Exemple #5
0
 void SetupScalarResult(CommonFunctions.WarewolfEvalResult warewolfEvalResult)
 {
     if (warewolfEvalResult.IsWarewolfAtomResult)
     {
         _scalarResult = warewolfEvalResult as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
         if (_scalarResult.Item.IsDataString)
         {
             var str = _scalarResult.Item.ToString();
             if (str.Contains("\n") && !str.Contains("\r\n"))
             {
                 NewLineFormat = "\n";
             }
         }
     }
 }
Exemple #6
0
 void SetupForWarewolfRecordSetResult(CommonFunctions.WarewolfEvalResult warewolfEvalResult)
 {
     if (warewolfEvalResult.IsWarewolfRecordSetResult && warewolfEvalResult is CommonFunctions.WarewolfEvalResult.WarewolfRecordSetResult listResult)
     {
         var stringValue = new StringBuilder();
         foreach (var item in listResult.Item.Data)
         {
             if (item.Key != EvaluationFunctions.PositionColumn)
             {
                 var data = CommonFunctions.WarewolfEvalResult.NewWarewolfAtomListresult(item.Value) as CommonFunctions.WarewolfEvalResult.WarewolfAtomListresult;
                 var warewolfEvalResultToString = ExecutionEnvironment.WarewolfEvalResultToString(data);
                 AppendEvaluatedString(ref stringValue, warewolfEvalResultToString);
             }
         }
         _scalarResult = CommonFunctions.WarewolfEvalResult.NewWarewolfAtomResult(DataStorage.WarewolfAtom.NewDataString(stringValue.ToString())) as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
     }
 }