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