我有一个具有以下绑定的蓝牙 BLE 设备绑定:
[BaseType (typeof (CBPeripheralDelegate), Delegates=new string [] {"WeakDelegate"},
Events=new Type [] { typeof (BrspDelegate) })]
interface Brsp
{
//@property (nonatomic, weak) id <BrspDelegate> delegate;
[Export ("delegate")]
[NullAllowed]
BrspDelegate Delegate { get; set; }
[Wrap ("WeakDelegate")]
[NullAllowed]
NSObject WeakDelegate { get; set; }
...other stuff
}
以下代表:
[BaseType(typeof(NSObject))]
[Model]
interface BrspDelegate
{
[Abstract]
[Export("brsp:OpenStatusChanged:"), EventArgs("OpenStatus")]
...other stuff
}
当我为 openstatuschanged 连接生成的事件处理程序时,它会立即使应用程序崩溃,并且我没有收到任何可能出错的反馈。我仍然是绑定的新手,所以...
我有一种感觉,我在“事件 = ...”部分犯了错误,有什么想法吗?
谢谢,
罗吉尔