Esempio n. 1
0
		public AsyncInitableAdapter (IAsyncInitableImplementor implementor)
		{
			if (implementor == null)
				throw new ArgumentNullException ("implementor");
			else if (!(implementor is GLib.Object))
				throw new ArgumentException ("implementor must be a subclass of GLib.Object");
			this.implementor = implementor as GLib.Object;
		}
 static void InitAsync_cb(IntPtr inst, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
 {
     try {
         IAsyncInitableImplementor           __obj      = GLib.Object.GetObject(inst, false) as IAsyncInitableImplementor;
         GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker(cb, user_data);
         __obj.InitAsync(io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
 public AsyncInitableAdapter(IAsyncInitableImplementor implementor)
 {
     if (implementor == null)
     {
         throw new ArgumentNullException("implementor");
     }
     else if (!(implementor is GLib.Object))
     {
         throw new ArgumentException("implementor must be a subclass of GLib.Object");
     }
     this.implementor = implementor as GLib.Object;
 }
        static bool InitFinish_cb(IntPtr inst, IntPtr res, out IntPtr error)
        {
            error = IntPtr.Zero;

            try {
                IAsyncInitableImplementor __obj = GLib.Object.GetObject(inst, false) as IAsyncInitableImplementor;
                bool __result;
                __result = __obj.InitFinish(GLib.AsyncResultAdapter.GetObject(res, false));
                return(__result);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, true);
                // NOTREACHED: above call does not return.
                throw e;
            }
        }