//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CommonHelpers satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

namespace CommonHelpers {

//**************************************************************************************************
public class HCmdLineKeyDefinition {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public string SwitchKey { get; private set; }
public bool Required { get; private set; }
public HCmdLineKeyArgumentation Argumentation { get; private set; }

//==================================================================================================

/// <exception cref="ArgumentNullException" />
/// <exception cref="ArgumentException" />
public HCmdLineKeyDefinition(string switchKey)
   :this ( switchKey, false )
{}

/// <exception cref="ArgumentNullException" />
/// <exception cref="ArgumentException" />
public HCmdLineKeyDefinition(string switchKey,bool required)
   :this ( switchKey, required, HCmdLineKeyArgumentation.None )
{}

/// <exception cref="ArgumentNullException" />
/// <exception cref="ArgumentException" />
public HCmdLineKeyDefinition(string switchKey,HCmdLineKeyArgumentation argumentation)
   :this ( switchKey, false, argumentation )
{}

/// <exception cref="ArgumentNullException" />
/// <exception cref="ArgumentException" />
public HCmdLineKeyDefinition( string switchKey, bool required,
                              HCmdLineKeyArgumentation argumentation )
{
   HArgChecking.VerifyNotNull( switchKey );
   if ( switchKey == "" )
      throw new ArgumentException(
         "Switch key name for command line parameters parse must not be empty.",
         "switchKey" );
   if ( HString.HasBoundaryWhiteSpace( switchKey ) )
      throw new ArgumentException(
         "Switch key name for command line parameters parse must not have bound spaces.",
         "switchKey" );
   SwitchKey = switchKey;
   Required = required;
   Argumentation = argumentation;
}

//==================================================================================================

public virtual HCmdLineKeyDefinition Duplicate()
{
   return (HCmdLineKeyDefinition)MemberwiseClone();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HCmdLineKeyDefinition
//**************************************************************************************************

} // CommonHelpers
