reactos/irc/TechBot/TechBot.Library/Attributes/CommandParameterAttribute.cs
Marc Piulachs d7b2077ed8 - code refactoring
- made more and more easily extensible:
   * commands automatically loaded from plugins dlls
   * declarative and automatic command parameter parsing
   * common code moved to base classes
- other fixes

svn path=/trunk/; revision=33344
2008-05-07 14:59:28 +00:00

44 lines
1.3 KiB
C#

using System;
namespace TechBot.Library
{
/// <summary>Implements a basic command-line switch by taking the
/// switching name and the associated description.</summary>
/// <remark>Only currently is implemented for properties, so all
/// auto-switching variables should have a get/set method supplied.</remark>
[AttributeUsage( AttributeTargets.Property )]
public class CommandParameterAttribute : Attribute
{
#region Private Variables
private string m_name = "";
private string m_description = "";
private bool m_Required = true;
#endregion
#region Public Properties
/// <summary>Accessor for retrieving the switch-name for an associated
/// property.</summary>
public string Name { get { return m_name; } }
/// <summary>Accessor for retrieving the description for a switch of
/// an associated property.</summary>
public string Description { get { return m_description; } }
public bool Required { get { return m_Required; } }
#endregion
#region Constructors
/// <summary>
/// Attribute constructor.
/// </summary>
public CommandParameterAttribute(string name, string description)
{
m_name = name;
m_description = description;
}
#endregion
}
}