/// <summary>
        /// Registers a callback for interval update notifications.
        /// </summary>
        /// <remarks>
        /// Registering for Interval udpates allows you to use the interval settings
        /// set by the user to update your display if required.
        /// </remarks>
        /// <param name="handler">The delegate to invoke.</param>
        public void RegisterIntervalUpdateHandler(SimplePluginDelegate handler)
        {
            if (handler == null)
            {
                throw new InvalidOperationException("Delegate handler can not be null.");
            }

            CallbackRegistration registration = new CallbackRegistration(
                NativeApi.PhGetGeneralCallback(PhGeneralCallback.IntervalUpdate),
                (parameter, context) => handler(this)
                );

            _registrations.Add(registration);
        }
        /// <summary>
        /// Registers a callback for Plugin unload notifications.
        /// </summary>
        /// <param name="handler">The delegate to invoke.</param>
        public void RegisterUnLoadHandler(SimplePluginDelegate handler)
        {
            if (handler == null)
            {
                throw new InvalidOperationException("Delegate handler can not be null.");
            }

            CallbackRegistration registration = new CallbackRegistration(
                NativeApi.PhGetPluginCallback(this.Plugin, PhPluginCallback.Unload),
                (parameter, context) => handler(this)
                );

            _registrations.Add(registration);
        }
        /// <summary>
        /// Registers a callback for Plugin load notifications.
        /// </summary>
        /// <param name="handler">The delegate to invoke.</param>
        public void RegisterLoadHandler(SimplePluginDelegate handler)
        {
            if (handler == null)
                throw new InvalidOperationException("Delegate handler can not be null.");

            CallbackRegistration registration = new CallbackRegistration(
                NativeApi.PhGetPluginCallback(this.Plugin, PhPluginCallback.Load),
                (parameter, context) => handler(this)
                );

            _registrations.Add(registration);
        }
        /// <summary>
        /// Registers a callback for interval update notifications.
        /// </summary>
        /// <remarks>
        /// Registering for Interval udpates allows you to use the interval settings
        /// set by the user to update your display if required.
        /// </remarks>
        /// <param name="handler">The delegate to invoke.</param>
        public void RegisterIntervalUpdateHandler(SimplePluginDelegate handler)
        {
            if (handler == null)
                throw new InvalidOperationException("Delegate handler can not be null.");

            CallbackRegistration registration = new CallbackRegistration(
                NativeApi.PhGetGeneralCallback(PhGeneralCallback.IntervalUpdate),
                (parameter, context) => handler(this)
                );

            _registrations.Add(registration);
        }