Here’s my code:
Definition:
List<LoginPlugin> loginPlugins = new List<LoginPlugin>();
public override List<LoginPlugin> LoginPlugins
{
get
{
if (loginPlugins.Count == 0)
loginPlugins.Add(new MyLoginPlugin());
return loginPlugins;
}
}
public override void Close()
{
loginPlugins.Clear();
}
With break points, I can see that Init(surveilanceUsername) and Close() is called on the login plugin. If I log in to a server in the Smart Client and then log out (with the key-icon) I can see that Close() is called in the plugin definition, so the list is cleared.
However, when I log in the SECOND time with the same Smart Client instance and put a break-point in the Init(surveilanceUsername), the method is called twice, one with a already created instance. This proves that the internal LoginPlugins list isn’t cleared on a valid logout. Please research this and get back to me with the result, thanks.