Home > Net >  Text automatic generation of fun
Text automatic generation of fun

Time:12-19

Work need to generate a string of Fun statement, from the Internet to check the following statement:
 
Public List Get_Jck (string expressiong)
{

Expressiong=@ "(JiChuKu x)=& gt; "+ expressiong;//form such as x. administrative area=="Beijing" | | x. Administrative area=="Shanghai" | | x. Administrative areas=="hebei" & amp; & X. regional city=="city" & amp; & X. water-bearing layers of a=="shallow" & amp; & X. water-bearing layers of a=="deep"

Var options=ScriptOptions. Default. AddReferences (typeof (JiChuKu). The Assembly). AddImports (" Module ");
Var funcb=CSharpScript. EvaluateAsync (expressiong, options). The Result;

List SelectedList=JiChuKuData. Where (funcb). ToList ();
Return SelectedList;
}

The above statement is can run, but there are many problems:
1, in order to use the above two other code, I have to need to download the 4 DLL (400 m) together,

2, although the above code is run normally, but later I use installer project generated installer, appears analyzer reference failed...

3, I studied for half a day on the Internet, I found. Net with the System. Linq. Expressions of own LambdaExpression if can easily solve this kind of thing
But my level is too low, which you have the time to have the ability, can you help me?
Thank you,


  •  Tags:  
  • C#
  • Related