File: UserTask.cs

package info (click to toggle)
nant 0.85-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,704 kB
  • ctags: 6,757
  • sloc: cs: 50,420; makefile: 129; cpp: 70; xml: 40; sh: 1
file content (31 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using NAnt.Core;
using NAnt.Core.Attributes;

namespace NAnt.Examples.Tasks {
    [TaskName("usertask")]
    public class TestTask : Task {
        #region Private Instance Fields

        private string _message;

        #endregion Private Instance Fields

        #region Public Instance Properties

        [TaskAttribute("message", Required=true)]
        public string FileName {
            get { return _message; }
            set { _message = value; }
        }

        #endregion Public Instance Properties

        #region Override implementation of Task

        protected override void ExecuteTask() {
            Log(Level.Info, _message.ToUpper());
        }

        #endregion Override implementation of Task
    }
}