PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/SavedEventArgs.cs

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