root/TaskScheduler/TaskScheduler/Tasks/PrintTask.cs

47
1
#region Using Statements
1
#region Using Statements
2
2
3
using System;
3
using System.Diagnostics;
4
using System.Diagnostics;
4
5
5
#endregion
6
#endregion
6
7
7
namespace Tasks
8
namespace Tasks
8
{
9
{
9
    public class PrintTask : Task
10
    [DebuggerDisplay("Name = {Name}, Id = {Id}, LastRan = {LastRan}")]
11
    public class PrintTask : ITask
10
    {
12
    {
11
        public override void Run()
13
        #region ITask Members
14
15
        public void Run()
12
        {
16
        {
13
            Debug.Print(string.Format("Printing line for Task: {0} last ran at {1}", Name, LastRan));
17
            Debug.Print(string.Format("Printing line for Task: {0} last ran at {1}", Name, LastRan));
14
        }
18
        }
19
20
        /// <summary>
21
        /// Gets or sets the name.
22
        /// </summary>
23
        /// <value>The name.</value>
24
        public string Name { get; set; }
25
26
        /// <summary>
27
        /// Gets or sets a value indicating whether this <see cref="ITask"/> is active.
28
        /// </summary>
29
        /// <value><c>true</c> if active; otherwise, <c>false</c>.</value>
30
        public bool Active { get; set; }
31
32
        /// <summary>
33
        /// Gets or sets the last ran.
34
        /// </summary>
35
        /// <value>The last ran.</value>
36
        public DateTime? LastRan { get; set; }
37
38
        /// <summary>
39
        /// Gets or sets the id.
40
        /// </summary>
41
        /// <value>The id.</value>
42
        public decimal? Id { get; set; }
43
44
        #endregion
15
    }
45
    }
16
}
46
}