https://bugzilla.novell.com/show_bug.cgi?id=665345
https://bugzilla.novell.com/show_bug.cgi?id=665345#c2 --- Comment #2 from Jonathan Dick <[email protected]> 2011-02-01 17:43:57 UTC --- Here's the implementation one has to repeat for each type of service they want to bind. I guess my definition of way more verbose is perhaps a bit radical, but I know other coders that would think this looks pretty ugly, compared to adding a nice generic helper class... Point is, by adding a helper class, that doesn't mean you can't still do it this way as well... It's just there if it can make your life a bit easier and you desire to use it... public class TweetServiceBinder : Binder { public TweetServiceBinder(BindingTweetService service) { this.ServiceInstance = service; } public BindingTweetService ServiceInstance { get; private set; } } public class TweetServiceConnection : Java.Lang.Object, IServiceConnection { public event Action<BindingTweetService> Connected; public event Action Disconnected; public void OnServiceConnected(ComponentName className, IBinder serviceBinder) { if (this.Connected != null) this.Connected((serviceBinder as TweetServiceBinder).ServiceInstance); } public void OnServiceDisconnected(ComponentName className) { if (this.Disconnected != null) this.Disconnected(); } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
