LockedDatabaseDelegate Delegate
Defines the signature (the parameters and the return value) of the application-defined method to be called when the Bayesian spam or non-spam database file appears to be locked.

Namespace: MailBee.AntiSpam
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public delegate bool LockedDatabaseDelegate(
	string filename,
	bool isSpamDatabase
)

Parameters

filename
Type: SystemString
The filename of the database file which is locked, as specified by the corresponding parameter of SaveDatabase(String, String) or LoadDatabase(String, String) methods.
isSpamDatabase
Type: SystemBoolean
true if the database being locked is spam database; false if non-spam.

Return Value

Type: Boolean
Must return true if MailBee should immediately make another attempt to open the file. If false, MailBee will throw MailBeeIOException.
Remarks

To set this delegate, use OnLockedDatabase property.

In the delegate handler, you will typically make some delay to let other processes complete saving the database, check if the file is no longer locked, and return true. To avoid deadlocks, it's recommended to have some kind of a counter (if it reaches certain value, consider that another application has hanged and you return false as you can't proceed).

See Also