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.
MailBee.NET (in MailBee.NET.dll) Version: 12.3.1 build 666 for .NET 4.5
public delegate bool LockedDatabaseDelegate(
Public Delegate Function LockedDatabaseDelegate (
filename As String,
isSpamDatabase As Boolean
) As Boolean
- 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.
- Type: SystemBoolean
true if the database being locked is spam database; false if non-spam.
Must return true
if MailBee should immediately make another attempt to open the file. If false
MailBee will throw MailBeeIOException
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).