11using Antlr . Runtime ;
2+ using Memoria ;
23using NCalc . Domain ;
34using System ;
45using System . Collections ;
1011// Original author: sebastienros https://archive.codeplex.com/?p=ncalc
1112// Author of this version: pitermarx https://github.com/pitermarx/NCalc-Edge
1213
14+ /* Crash with mono.dll if too much log ?
15+ 0x00000000064589BF(Mono JIT Code)(wrapper managed - to - native) System.Reflection.Assembly:GetCallingAssembly()
16+ 0x00000000064588FD(Mono JIT Code) System.Diagnostics.Trace:TraceInformation(string)
17+ 0x0000000006457A03(Mono JIT Code) NCalc.Expression:CleanCache()
18+ 0x000000000643DD99(Mono JIT Code) NCalc.Expression:Compile(string, bool)
19+ 0x000000000643D734(Mono JIT Code) NCalc.Expression:HasErrors()
20+ 0x000000000643C8CF(Mono JIT Code) NCalc.Expression:Evaluate()
21+ */
22+
1323namespace NCalc
1424{
1525 public class Expression
@@ -79,7 +89,7 @@ private static void CleanCache()
7989 foreach ( string key in keysToRemove )
8090 {
8191 compiledExpressions . Remove ( key ) ;
82- Trace . TraceInformation ( "Cache entry released: " + key ) ;
92+ // Trace.TraceInformation("Cache entry released: " + key);
8393 }
8494 }
8595 finally
@@ -102,7 +112,7 @@ public static LogicalExpression Compile(string expression, bool nocache)
102112
103113 if ( compiledExpressions . ContainsKey ( expression ) )
104114 {
105- Trace . TraceInformation ( "Expression retrieved from cache: " + expression ) ;
115+ // Trace.TraceInformation("Expression retrieved from cache: " + expression);
106116 var wr = compiledExpressions [ expression ] ;
107117 logicalExpression = wr . Target as LogicalExpression ;
108118
@@ -144,7 +154,7 @@ public static LogicalExpression Compile(string expression, bool nocache)
144154
145155 CleanCache ( ) ;
146156
147- Trace . TraceInformation ( "Expression added to cache: " + expression ) ;
157+ // Trace.TraceInformation("Expression added to cache: " + expression);
148158 }
149159 }
150160
0 commit comments