소스 검색

Update README.md

Sébastien Ros 11 년 전
부모
커밋
03a4224988
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      README.md

+ 7 - 7
README.md

@@ -12,16 +12,16 @@ Jint is a Javascript interpreter for .NET. Jint doesn't compile Javascript to .N
 
 
     script= @"
-      function square(x) { 
-        return x * x; 
+      function hello() { 
+        log("Hello World");
       };
-  
-    return square(number);
     ";
   
-    var result = new JintEngine()
-      .SetParameter("number", 3)
-      .Run(script));
+    var engine = new Engine(cfg => cfg
+        .WithDelegate("log", new Action<object>(Console.WriteLine))
+    );
+    
+    engine.Execute("hello()");
 
 
 You can also check the actual implemented test suite for more samples.