public ConverterAdapter (IConverterImplementor 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 Reset_cb(IntPtr inst) { try { IConverterImplementor __obj = GLib.Object.GetObject(inst, false) as IConverterImplementor; __obj.Reset(); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, false); } }
public ConverterAdapter(IConverterImplementor 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 int Convert_cb(IntPtr inst, IntPtr inbuf, UIntPtr inbuf_size, IntPtr outbuf, UIntPtr outbuf_size, int flags, out UIntPtr bytes_read, out UIntPtr bytes_written, out IntPtr error) { error = IntPtr.Zero; try { IConverterImplementor __obj = GLib.Object.GetObject(inst, false) as IConverterImplementor; GLib.ConverterResult __result; ulong mybytes_read; ulong mybytes_written; __result = __obj.Convert(inbuf, (ulong)inbuf_size, outbuf, (ulong)outbuf_size, (GLib.ConverterFlags)flags, out mybytes_read, out mybytes_written); bytes_read = new UIntPtr(mybytes_read); bytes_written = new UIntPtr(mybytes_written); return((int)__result); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, true); // NOTREACHED: above call does not return. throw e; } }