Encog.EncogFramework.RegisterPlugin C# (CSharp) Method

RegisterPlugin() public method

Register a plugin. If this plugin provides a core service, such as calculation or logging, this will remove the old plugin.
public RegisterPlugin ( EncogPluginBase plugin ) : void
plugin EncogPluginBase The plugin to register.
return void
        public void RegisterPlugin(EncogPluginBase plugin)
        {
            // is it not a general plugin?
            if (plugin.PluginServiceType != EncogPluginBaseConst.SERVICE_TYPE_GENERAL)
            {
                if (plugin.PluginServiceType == EncogPluginBaseConst.SERVICE_TYPE_LOGGING)
                {
                    // remove the old logging plugin
                    if (_loggingPlugin != null)
                    {
                        _plugins.Remove(_loggingPlugin);
                    }
                    _loggingPlugin = (IEncogPluginLogging1) plugin;
                }
            }
            // add to the plugins
            _plugins.Add(plugin);
        }