예제 #1
0
파일: YqlNode.cs 프로젝트: octogonz/yamster
 public static YqlNode CloneIfNotNull(YqlNode source)
 {
     if (source == null)
     {
         return(null);
     }
     return(source.Clone());
 }
예제 #2
0
        internal Func <YqlExecutionContext, bool> CompileMessage(YqlNode rootNode)
        {
            var compiledNode = CompileNode(rootNode.Clone());
            //Debug.WriteLine(compiledNode.Expression.ToString());
            //Debug.WriteLine("-------");
            var lambda = Expression.Lambda <Func <YqlExecutionContext, bool> >(compiledNode.Expression, ExecutionContextParameter);
            //Debug.WriteLine(lambda.ToString());
            //Debug.WriteLine("-------");
            Func <YqlExecutionContext, bool> func = lambda.Compile();

            return(func);
        }