PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/SavedEventArgs.cs

#
C# | 60 lines | 23 code | 10 blank | 27 comment | 0 complexity | 6b96a581a5ea05a384ceceb4966e65c5 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. namespace BlogEngine.Core
  2. {
  3. using System;
  4. /// <summary>
  5. /// The action performed by the save event.
  6. /// </summary>
  7. public enum SaveAction
  8. {
  9. /// <summary>
  10. /// Default. Nothing happened.
  11. /// </summary>
  12. None,
  13. /// <summary>
  14. /// It's a new object that has been inserted.
  15. /// </summary>
  16. Insert,
  17. /// <summary>
  18. /// It's an old object that has been updated.
  19. /// </summary>
  20. Update,
  21. /// <summary>
  22. /// The object was deleted.
  23. /// </summary>
  24. Delete
  25. }
  26. /// <summary>
  27. /// The saved event args.
  28. /// </summary>
  29. public class SavedEventArgs : EventArgs
  30. {
  31. #region Constructors and Destructors
  32. /// <summary>
  33. /// Initializes a new instance of the <see cref="SavedEventArgs"/> class.
  34. /// </summary>
  35. /// <param name="action">
  36. /// The action.
  37. /// </param>
  38. public SavedEventArgs(SaveAction action)
  39. {
  40. this.Action = action;
  41. }
  42. #endregion
  43. #region Properties
  44. /// <summary>
  45. /// Gets or sets the action that occured when the object was saved.
  46. /// </summary>
  47. public SaveAction Action { get; set; }
  48. #endregion
  49. }
  50. }