diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-05-24 11:37:19 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-05-24 11:37:19 (GMT) |
commit | baa898789a2b70b4b969ac36a096c3fa77806ca5 (patch) | |
tree | 4ab1ddb575e7fec66fc9baf0abbc9560486370b2 /contrib/csharp/bindings/TestStatePass.cs | |
parent | d0dcc2cbec95f3bfae5da9ff07fc63833eb61342 (diff) | |
download | uscxml-baa898789a2b70b4b969ac36a096c3fa77806ca5.zip uscxml-baa898789a2b70b4b969ac36a096c3fa77806ca5.tar.gz uscxml-baa898789a2b70b4b969ac36a096c3fa77806ca5.tar.bz2 |
CSharp bindings and regression tests
Diffstat (limited to 'contrib/csharp/bindings/TestStatePass.cs')
-rw-r--r-- | contrib/csharp/bindings/TestStatePass.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/csharp/bindings/TestStatePass.cs b/contrib/csharp/bindings/TestStatePass.cs new file mode 100644 index 0000000..b4712a4 --- /dev/null +++ b/contrib/csharp/bindings/TestStatePass.cs @@ -0,0 +1,29 @@ +using System; +using System.Runtime.InteropServices; + +namespace uscxml_test { + using org.uscxml; + + class TestStatePass + { + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + private static extern void SetDllDirectory(string lpPathName); + + [STAThread] + static void Main(string[] args) { + + if (args.Length < 1) { + System.Console.WriteLine("Expected SCXML filename and optional dllPath as arguments"); + Environment.Exit(-1); + } + + try { + if (args.Length > 1) + SetDllDirectory(args[1]); + } catch (System.EntryPointNotFoundException) {} + + Interpreter sc = Interpreter.fromURL(args[0]); + while(sc.step() != InterpreterState.USCXML_FINISHED) {} + } + } +} |