我有一個外部的庫如何映射從MonoTouch中的兩個類派生的接口?
@interface AGSGPS : UIView <CLLocationManagerDelegate>
通常你會在ApiDefinition.cs定義爲以下接口定義:
[BaseType (typeof (UIView))]
interface AGSGPS : CLLocationManagerDelegate
這樣做的問題是,無論UIView
和CLLocationManagerDelegate
是類和這可以分解爲以下代碼:
class AGSGPS : UIView, CLLocationManagerDelegate
這是非法的al在C#
想法?
我有一個可能的修復我只是想和我的測試,而不是使用預先定義的CLLocationManagerDelegate,我在ApiDefinition文件中重新定義它,然後能夠從它派生出來,因爲它是一個接口而不是一個類,不是最優的,但總比沒有好。 – Kenny
看看[WeakDelegate](http://tirania.org/blog/archive/2009/Oct-15.html) – holmes