public void FuzzyFindTree() { FuzzyDelegate = NFunc<string, int>.UnsafeDelegate(BTFTemplate.GetFuzzyPointBTFScript(ScriptDict) + "return default;"); foreach (var item in Dict) { Assert.Equal(item.Value, FuzzyDelegate(item.Key)); } }
public static void RunDelegate5() { var action = NFunc <string, string, string> .UnsafeDelegate(@" string result = arg1 +"" ""+ arg2; Console.WriteLine(result); return result;"); string result = action("Hello", "World1!"); Assert.Equal("Hello World1!", result); }