/// <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 { SingletonLogger.Instance.Debug(string.Format("Stopping Plugin, Plugin: '{0}'.", e.Descriptor.PluginName)); // inform the plugin that it should stop its services Stop(context, e); // fire the PluginStopped event of the PluginContext context.OnPluginStopped(e); } catch (Exception ex) { SingletonLogger.Instance.Debug(ex.Message, ex); } }