bdb3a8091b092fede5a62b4d0a087059183c6492
[reactos.git] / irc / TechBot / TechBot.Library / Attributes / CommandParameterAttribute.cs
1 using System;
2
3 namespace TechBot.Library
4 {
5 /// <summary>Implements a basic command-line switch by taking the
6 /// switching name and the associated description.</summary>
7 /// <remark>Only currently is implemented for properties, so all
8 /// auto-switching variables should have a get/set method supplied.</remark>
9 [AttributeUsage( AttributeTargets.Property )]
10 public class CommandParameterAttribute : Attribute
11 {
12 #region Private Variables
13 private string m_name = "";
14 private string m_description = "";
15 private bool m_Required = true;
16 #endregion
17
18 #region Public Properties
19 /// <summary>Accessor for retrieving the switch-name for an associated
20 /// property.</summary>
21 public string Name { get { return m_name; } }
22
23 /// <summary>Accessor for retrieving the description for a switch of
24 /// an associated property.</summary>
25 public string Description { get { return m_description; } }
26
27 public bool Required { get { return m_Required; } }
28
29 #endregion
30
31 #region Constructors
32
33 /// <summary>
34 /// Attribute constructor.
35 /// </summary>
36 public CommandParameterAttribute(string name, string description)
37 {
38 m_name = name;
39 m_description = description;
40 }
41 #endregion
42 }
43 }