namespace Wayne.Lib.IO
{
///
/// Event argument that is used to notify and ask what action to take if a partially written file is found.
///
public class SafeFileWritingCleanupEventArgs : UserTokenEventArgs
{
#region Fields
private SafeFileWritingCleanupAction action = SafeFileWritingCleanupAction.Delete;
private string fileName;
#endregion
///
/// Creates a new instance of the SafeFileWritingCleanupEventArgs class.
///
///
///
internal SafeFileWritingCleanupEventArgs(string fileName, object userToken)
: base(userToken)
{
this.fileName = fileName;
}
#region Properties
///
/// Sets or gets the action to take for the found temporary file.
///
public SafeFileWritingCleanupAction Action
{
get { return action; }
set { action = value; }
}
///
/// Name of the found temporary file.
///
public string FileName
{
get { return fileName; }
}
#endregion
}
}