예제 #1
0
    internal Eina.Value ManagedCb(Efl.ViewModel view_model, System.String property)
    {
        var _ret_var = _cb(_cb_data, view_model, property);

        Eina.Error.RaiseIfUnhandledException();
        return(_ret_var);
    }
예제 #2
0
    [return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Eina.ValueMarshaler))]    internal static Eina.Value Cb(IntPtr cb_data, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalEo <Efl.Eo.NonOwnTag>))] Efl.ViewModel view_model, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))] System.String property)
    {
        GCHandle handle = GCHandle.FromIntPtr(cb_data);

        EflViewModelPropertyGet cb = (EflViewModelPropertyGet)handle.Target;

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