diff options
Diffstat (limited to 'embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs')
-rw-r--r-- | embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs index da941b0..7c174ed 100644 --- a/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs +++ b/embedding/csharp/uSCXMLEmbedding/Extensions/CustomInvoker.cs @@ -13,7 +13,9 @@ namespace embedding {
public override Invoker create(Interpreter interpreter)
{
- return new CustomInvoker();
+ CustomInvoker invoker = new CustomInvoker();
+ invoker.swigCMemOwn = false;
+ return invoker;
}
public override Data getDataModelVariables()
@@ -31,20 +33,20 @@ namespace embedding public override void invoke(InvokeRequest req)
{
- }
-
- public override void send(SendRequest req)
- {
Console.WriteLine(req);
// send in s1.onentry
- if ("This is some content!" == req.getContent())
+ if ("Some string content" == req.getContent())
{
- returnEvent(new Event("received1"));
+ returnEvent(new Event("received1"), true);
return;
}
+ }
+
+ public override void send(SendRequest req)
+ {
+ Console.WriteLine(req);
// send in s2.onentry
- if (req.getParams().ContainsKey("foo")
- && "bar" == (req.getParams()["foo"][0].getAtom()))
+ if (req.getName() == "foo")
{
returnEvent(new Event("received2"));
return;
|