Ejemplo n.º 1
0
        /// <summary>
        /// Calls the Stop method of the Plugin class.
        /// </summary>
        /// <param name="context">The PluginContext that is hosting this Plugin instance.</param>
        /// <param name="e">EventArgs that contain a PluginDescriptor with meta-data about the Plugin instance.</param>
        internal void OnStop(PluginContext context, PluginDescriptorEventArgs e)
        {
            try
            {
                Log.WriteLine("Stopping Plugin, Plugin: '{0}'.", e.Descriptor.PluginName);

                // inform the plugin that it should stop its services
                this.Stop(context, e);

                // fire the PluginStopped event of the PluginContext
                context.OnPluginStopped(e);
            }
            catch (Exception ex)
            {
                Log.WriteLine(ex);
            }
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Calls the Start method of the Plugin class.
        /// </summary>
        /// <param name="context">The PluginContext that is hosting this Plugin instance.</param>
        /// <param name="e">EventArgs that contain a PluginDescriptor with meta-data about the Plugin instance.</param>
		internal void OnStart(PluginContext context, PluginDescriptorEventArgs e)
		{			
            try
            {
                Log.WriteLine("Starting Plugin, Plugin: '{0}'.", e.Descriptor.PluginName);

                // inform the plugin that it should start its services
                this.Start(context, e);

				Application.DoEvents();

                // fire the PluginStarted event of the PluginContext
                context.OnPluginStarted(e);
            }
            catch(Exception ex)
            {
                Log.WriteLine(ex);
            }
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Raises the PluginStopped event.
		/// </summary>
		/// <param name="e"></param>
		internal void OnPluginStopped(PluginDescriptorEventArgs e)
		{
			EventManager.Raise<PluginDescriptorEventArgs>(this.PluginStopped, this, e);
		}
Ejemplo n.º 4
0
 /// <summary>
 /// Raises the PluginStopped event.
 /// </summary>
 /// <param name="e"></param>
 internal void OnPluginStopped(PluginDescriptorEventArgs e)
 {
     EventManager.Raise <PluginDescriptorEventArgs>(this.PluginStopped, this, e);
 }
Ejemplo n.º 5
0
		/// <summary>
		/// The abstract method that must be overriden by derived classes to stop plugin functionality
        /// </summary>
        /// <param name="context">The PluginContext that is hosting this Plugin instance.</param>
        /// <param name="e">EventArgs that contain a PluginDescriptor with meta-data about the Plugin instance.</param>
		protected abstract void Stop(PluginContext context, PluginDescriptorEventArgs e);
Ejemplo n.º 6
0
 /// <summary>
 /// The abstract method that must be overriden by derived classes to stop plugin functionality
 /// </summary>
 /// <param name="context">The PluginContext that is hosting this Plugin instance.</param>
 /// <param name="e">EventArgs that contain a PluginDescriptor with meta-data about the Plugin instance.</param>
 protected abstract void Stop(PluginContext context, PluginDescriptorEventArgs e);