123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- 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
- }
- }
|