Hi Hani,

Probably something like this:

[BaseType (typeof (NSObject), Name = "ReaderController", Delegates=new
string [] { "WeakDelegate" }, Events=new Type [] { typeof
(ReaderControllerDelegate)})]
interface ReaderController {
[Export ("delegate"), NullAllowed]
NSObject WeakDelegate { get; set; }
 [Wrap ("WeakDelegate")]
AtmHudDelegate Delegate { get; set; }
}

[Model]
[BaseType (typeof (NSObject), Name="ReaderControllerDelegate")]
interface ReaderControllerDelegate {
[Export ("onDevicePlugged")]
OnDevicePlugged ();

[Export ("onDeviceUnplugged")]
OnDeviceUnplugged ();
}


I'm not an expert at this, though, so I may be wrong.

Jeff


On Sat, Feb 4, 2012 at 1:01 AM, Hani Gobran <[email protected]> wrote:

> Can someone explain or show how to convert this to c#  to use the Obj C
> library.  I think I have the rest converted correctly but I’m not too sure
> how to do this****
>
> ** **
>
> ** **
>
> @interface ReaderController : NSObject {****
>
>                 NSObject <ReaderControllerDelegate>* delegate;****
>
>                 BOOL detectDeviceChange;****
>
>     ReaderControllerState readerState;****
>
> }****
>
> ** **
>
> @property (nonatomic, assign) NSObject <ReaderControllerDelegate>*
> delegate;****
>
> ** **
>
> @protocol ReaderControllerDelegate <NSObject>****
>
> ** **
>
> @optional****
>
> - (void)onDevicePlugged;****
>
> - (void)onDeviceUnplugged;****
>
> ** **
>
> @end****
>
> ** **
>
> ** **
>
> Thanks,****
>
> ** **
>
> Hani****
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to