11using System ;
22using System . Collections . Generic ;
33using System . Globalization ;
4- using System . Linq ;
54using System . Text ;
6- using System . Text . RegularExpressions ;
75using ToolGood . Algorithm . Enums ;
8- using ToolGood . Algorithm . LitJson ;
9- using ToolGood . Algorithm . MathNet . Numerics ;
106
117namespace ToolGood . Algorithm . Internals . Functions
128{
@@ -1104,6 +1100,17 @@ public override Operand Calculate(AlgorithmEngine work)
11041100 }
11051101 return Operand . Error ( "Function VLOOKUP is not match !" ) ;
11061102 }
1103+ public override void ToString ( StringBuilder stringBuilder , bool addBrackets )
1104+ {
1105+ stringBuilder . Append ( "VLOOKUP(" ) ;
1106+ for ( int i = 0 ; i < funcs . Length ; i ++ ) {
1107+ if ( i > 0 ) {
1108+ stringBuilder . Append ( ", " ) ;
1109+ }
1110+ funcs [ i ] . ToString ( stringBuilder , false ) ;
1111+ }
1112+ stringBuilder . Append ( ')' ) ;
1113+ }
11071114 }
11081115
11091116 #endregion Lookup
@@ -1122,6 +1129,17 @@ public override Operand Calculate(AlgorithmEngine work)
11221129 foreach ( var item in funcs ) { var aa = item . Calculate ( work ) ; if ( aa . IsError ) { return aa ; } args . Add ( aa ) ; }
11231130 return Operand . Create ( args ) ;
11241131 }
1132+ public override void ToString ( StringBuilder stringBuilder , bool addBrackets )
1133+ {
1134+ stringBuilder . Append ( "Array(" ) ;
1135+ for ( int i = 0 ; i < funcs . Length ; i ++ ) {
1136+ if ( i > 0 ) {
1137+ stringBuilder . Append ( ", " ) ;
1138+ }
1139+ funcs [ i ] . ToString ( stringBuilder , false ) ;
1140+ }
1141+ stringBuilder . Append ( ')' ) ;
1142+ }
11251143 }
11261144
11271145 internal class Function_NUM : FunctionBase
@@ -1288,6 +1306,17 @@ public override Operand Calculate(AlgorithmEngine work)
12881306 }
12891307 return result ;
12901308 }
1309+ public override void ToString ( StringBuilder stringBuilder , bool addBrackets )
1310+ {
1311+ stringBuilder . Append ( "ArrayJson(" ) ;
1312+ for ( int i = 0 ; i < funcs . Length ; i ++ ) {
1313+ if ( i > 0 ) {
1314+ stringBuilder . Append ( ", " ) ;
1315+ }
1316+ funcs [ i ] . ToString ( stringBuilder , false ) ;
1317+ }
1318+ stringBuilder . Append ( ')' ) ;
1319+ }
12911320 }
12921321
12931322 internal class Function_ArrayJsonItem : Function_1
@@ -1306,6 +1335,13 @@ public override Operand Calculate(AlgorithmEngine work)
13061335 keyValue . Value = func1 . Calculate ( work ) ;
13071336 return new OperandKeyValue ( keyValue ) ;
13081337 }
1338+ public override void ToString ( StringBuilder stringBuilder , bool addBrackets )
1339+ {
1340+ stringBuilder . Append ( key ) ;
1341+ stringBuilder . Append ( ":" ) ;
1342+ func1 . ToString ( stringBuilder , false ) ;
1343+ }
1344+
13091345 }
13101346
13111347 #endregion getValue
0 commit comments