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

namespace CommonHelpers {

//**************************************************************************************************
partial class HConsole {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString()
{
   return InputString((string)null);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString(HConsoleInputOptions options)
{
   return InputString(null,options);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString(HValidateConsoleInputCallback validationCallback)
{
   return InputString(null,validationCallback);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString( HConsoleInputOptions options,
                           HValidateConsoleInputCallback validationCallback )
{
   return InputString(null,options,validationCallback);
}

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

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString([HOptional] string caption)
{
   return InputString(caption,0);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString([HOptional] string caption,HConsoleInputOptions options)
{
   return InputString(caption,0,options);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   [HOptional] string caption,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(caption,0,validationCallback);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   [HOptional] string caption,
   HConsoleInputOptions options,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(caption,0,options,validationCallback);
}

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

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString([HOptional] string caption,ConsoleColor? captionColor)
{
   return InputString(caption,captionColor,0);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString( [HOptional] string caption,
                           ConsoleColor? captionColor,
                           HConsoleInputOptions options )
{
   return InputString(caption,captionColor,0,options);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   [HOptional] string caption,
   ConsoleColor? captionColor,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(caption,captionColor,0,validationCallback);
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   [HOptional] string caption,
   ConsoleColor? captionColor,
   HConsoleInputOptions options,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(caption,captionColor,0,options,validationCallback);
}

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

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString(string caption,[HOptional] int maxCaptionLength)
{
   return InputString(
      caption, null, maxCaptionLength,
      null, null, 0, null );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString( string caption,
                           [HOptional] int maxCaptionLength,
                           HConsoleInputOptions options )
{
   return InputString(
      caption, null, maxCaptionLength,
      null, null, options, null );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   string caption,
   [HOptional] int maxCaptionLength,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(
      caption, null, maxCaptionLength,
      null, null, 0, validationCallback );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   string caption,
   [HOptional] int maxCaptionLength,
   HConsoleInputOptions options,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(
      caption, null, maxCaptionLength,
      null, null, options, validationCallback );
}

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

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString( string caption,
                           ConsoleColor? captionColor,
                           [HOptional] int maxCaptionLength )
{
   return InputString(
      caption, captionColor, maxCaptionLength,
      null, null, 0, null );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString( string caption,
                           ConsoleColor? captionColor,
                           [HOptional] int maxCaptionLength,
                           HConsoleInputOptions options )
{
   return InputString(
      caption, captionColor, maxCaptionLength,
      null, null, options, null );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   string caption,
   ConsoleColor? captionColor,
   [HOptional] int maxCaptionLength,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(
      caption, captionColor, maxCaptionLength,
      null, null, 0, validationCallback );
}

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   string caption,
   ConsoleColor? captionColor,
   [HOptional] int maxCaptionLength,
   HConsoleInputOptions options,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   return InputString(
      caption, captionColor, maxCaptionLength,
      null, null, options, validationCallback );
}

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

/// <exception cref="InvalidOperationException" />
/// <exception cref="HAbortConsoleInputException" />
public string InputString
(
   [HOptional] string caption,
   ConsoleColor? captionColor,
   [HOptional] int maxCaptionLength,
   ConsoleColor? foregroundColor,
   ConsoleColor? backgroundColor,
   HConsoleInputOptions options,
   [HOptional] HValidateConsoleInputCallback validationCallback
)
{
   string inputString = null;

   InputStringModify( caption, captionColor, maxCaptionLength,
      ref inputString, foregroundColor, backgroundColor,
      options, validationCallback );

   return inputString;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HConsole
//**************************************************************************************************

} // CommonHelpers
