/// <summary> /// Initializes the KeePass plugin. /// </summary> /// <param name="host">An <see cref="IPluginHost"/> instance.</param> /// <returns>True if initialization was successful, otherwise false.</returns> public override bool Initialize(IPluginHost host) { if (host == null) { return(false); } _host = host; _gen = new KeeDicewareGen(_host); _host.PwGeneratorPool.Add(_gen); return(true); }
/// <summary> /// Terminates the KeePass plugin. /// </summary> public override void Terminate() { if (_host != null && _gen != null) { _host.PwGeneratorPool.Remove(_gen.Uuid); } if (_host != null) { _host = null; } if (_gen != null) { _gen = null; } }