Ejemplo n.º 1
0
    internal Eina.Future ManagedCb(Efl.FilterModel parent, Efl.IModel child)
    {
        var _ret_var = _cb(_cb_data, parent, child);

        Eina.Error.RaiseIfUnhandledException();
        return(_ret_var);
    }
Ejemplo n.º 2
0
    [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Eina.FutureMarshaler))]    internal static Eina.Future Cb(IntPtr cb_data, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalEo <Efl.Eo.NonOwnTag>))] Efl.FilterModel parent, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalEo <Efl.Eo.NonOwnTag>))] Efl.IModel child)
    {
        GCHandle handle = GCHandle.FromIntPtr(cb_data);

        EflFilterModel cb = (EflFilterModel)handle.Target;

        Eina.Future _ret_var = default(Eina.Future);
        try {
            _ret_var = cb(parent, child);
        } catch (Exception e) {
            Eina.Log.Warning($"Callback error: {e.ToString()}");
            Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
        }
        return(_ret_var);
    }