forked from loongly/PureScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBinder.PureScript.ExceptionTest.cs
More file actions
68 lines (66 loc) · 1.44 KB
/
Copy pathBinder.PureScript.ExceptionTest.cs
File metadata and controls
68 lines (66 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using PureScript.Mono;
using System;
using UnityEngine;
using PureScript;
using System.Runtime.InteropServices;
using Object = UnityEngine.Object;
namespace PureScript
{
public class ExceptionTest : WObject
{
public System.Action _callback;
static Delegate5523eb28 callbackAction = Oncallback;
static void Oncallback(int arg0_h)
{
Exception __e = null;
try
{
var arg0Obj = ObjectStore.Get<global::PureScript.ExceptionTest>(arg0_h);
arg0Obj._callback();
}
catch(Exception e)
{
__e = e;
}
if(__e != null)
ScriptEngine.OnException(__e.ToString());
}
public System.Action callback
{
set
{
bool attach = (_callback == null);
_callback = value;
if(attach)
{
var callbackAction_p = Marshal.GetFunctionPointerForDelegate(callbackAction);
MonoBind.PureScript_ExceptionTest_set_callback(this.Handle, callbackAction_p);
ScriptEngine.CheckException();
}
}
get
{
return _callback;
}
}
public void NullPointException()
{
MonoBind.PureScript_ExceptionTest_NullPointException(this.Handle);
ScriptEngine.CheckException();
return ;
}
public void TestCallBack()
{
MonoBind.PureScript_ExceptionTest_TestCallBack(this.Handle);
ScriptEngine.CheckException();
return ;
}
public ExceptionTest()
{
var h = MonoBind.PureScript_ExceptionTest__ctor();
ScriptEngine.CheckException();
SetHandle(h);
ObjectStore.Store(this, h);
}
}
}