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

namespace CommonHelpers {

//**************************************************************************************************
partial class HCmdLineParameter {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage()
{
   return ComposeWrongSwitchKeyArgumentsMessage( false );
}
/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage([HOptional] string message)
{
   return ComposeWrongSwitchKeyArgumentsMessage( false, message );
}
/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage(string messageFmt,params object[] parameters)
{
   return ComposeWrongSwitchKeyArgumentsMessage( false, messageFmt, parameters );
}

//--------------------------------------------------------------------------------------------------

/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage(bool withInFullCmdLinePosition)
{
   return CreateWrongSwitchKeyArgumentsError( withInFullCmdLinePosition ).Message;
}
/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage( bool withInFullCmdLinePosition,
                                                     [HOptional] string message )
{
   return CreateWrongSwitchKeyArgumentsError( withInFullCmdLinePosition, message ).Message;
}
/// <exception cref="ArgumentNullException" />
public string ComposeWrongSwitchKeyArgumentsMessage( bool withInFullCmdLinePosition,
                                                     string messageFmt,params object[] parameters )
{
   return CreateWrongSwitchKeyArgumentsError(
      withInFullCmdLinePosition, messageFmt, parameters ).Message;
}

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

/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError()
{
   return CreateWrongSwitchKeyArgumentsError( false );
}
/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError
(
   [HOptional] string message
)
{
   return CreateWrongSwitchKeyArgumentsError( false, message );
}
/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError
(
   string messageFmt, params object[] parameters
)
{
   return CreateWrongSwitchKeyArgumentsError( false, messageFmt, parameters );
}

//--------------------------------------------------------------------------------------------------

/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError
(
   bool withInFullCmdLinePosition
)
{
   return CreateWrongSwitchKeyArgumentsError( null );
}
/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError
(
   bool withInFullCmdLinePosition, [HOptional] string message
)
{
   return HCmdLineParametersParseExceptionCreator.Create(
      withInFullCmdLinePosition ? AbsoluteStartPosition : RelativeStartPosition,
      withInFullCmdLinePosition,
      "Wrong arguments for command line switch key: \"{0}\".{1}",
      SwitchKeyWithSign, message != null ? "\n"+message : "" );
}
/// <exception cref="ArgumentNullException" />
public HCmdLineParametersParseException CreateWrongSwitchKeyArgumentsError
(
   bool withInFullCmdLinePosition, string messageFmt, params object[] parameters
)
{
   HArgChecking.VerifyNotNulls( messageFmt, parameters );
   return CreateWrongSwitchKeyArgumentsError( string.Format(messageFmt,parameters) );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HCmdLineParameter
//**************************************************************************************************

} // CommonHelpers
