/// <summary> /// Registers a Menu Item handler on the View menu. /// </summary> /// <param name="handler">The delegate to invoke.</param> public void RegisterMenuItemHandler(PluginParamsCallbackDelegate handler) { if (handler == null) { throw new InvalidOperationException("Delegate handler can not be null."); } CallbackRegistration registration = new CallbackRegistration( NativeApi.PhGetPluginCallback(this.Plugin, PhPluginCallback.MenuItem), (parameter, context) => handler(this, parameter, context) ); _registrations.Add(registration); }
/// <summary> /// Registers a Menu Item handler on the View menu. /// </summary> /// <param name="handler">The delegate to invoke.</param> public void RegisterMenuItemHandler(PluginParamsCallbackDelegate handler) { if (handler == null) throw new InvalidOperationException("Delegate handler can not be null."); CallbackRegistration registration = new CallbackRegistration( NativeApi.PhGetPluginCallback(this.Plugin, PhPluginCallback.MenuItem), (parameter, context) => handler(this, parameter, context) ); _registrations.Add(registration); }