2

バインド プロジェクトを作成しようとしていますが、3 つの異なるデリゲートを実装する次のインターフェイスをバインドする方法がわかりません。

@interface Integration :  NSObject<NSURLConnectionDelegate, SomeControllerDelegate, 
CLLocationManagerDelegate>
{
    id<VendorIntegrationDelegate> delegate;
    Information *Information;
    SomeController * controller;
}

@property(nonatomic,assign) id<VendorIntegrationDelegate> delegate;
@property(nonatomic,strong) Information *Information;
@property(nonatomic,strong) SomeController *controller;

@end

ApiDefinition.cs で、次のようにバインディングを作成しましたが、これには SomeControllerDelegate と CLLocationManagerDelegate の実装がありません。

[BaseType (typeof (NSUrlConnectionDelegate), Delegates=new string [] { "WeakDelegate" },
Events=new Type [] { typeof (VendorIntegrationDelegate)})]
public partial interface Integration
{
    [Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
    NSObject WeakDelegate { get; set; }

    [Wrap("WeakDelegate")]
    VendorIntegrationDelegate Delegate { get; set; }

    [Export ("Information", ArgumentSemantic.Retain)]
    Information Information { get; set; }

    [Export ("controller", ArgumentSemantic.Retain)]
    SomeController  Controller { get; set; }

}

このバインディングを作成中に見つけた問題は、インターフェイスが複数のクラスから継承されていることです。このバインディングの作成方法

4

1 に答える 1

1

質問が に関するものである場合、次のように、またSomeControllerDelegateはなしで宣言します。[Model][BaseType]

[Model]
interface SomeControllerDelegate
{
    //...
}

//...

[BaseType (typeof (NSUrlConnectionDelegate), /*...*/]
interface Integration : SomecontrollerDelegate
{
    ...
}
于 2013-09-24T09:43:05.813 に答える