public void Release()
{
if (Locked == false)
{
return;
}
try
{
FileStream.Unlock(0, long.MaxValue);
#if DEBUG
GC.SuppressFinalize(this); // [henon] disarm lock-release checker
#endif
}
catch (IOException)
{
// unlocking went wrong
Console.Error.WriteLine(GetType().Name + ": tried to unlock an unlocked filelock " + File);
throw;
}
Locked = false;
}