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

#if !WASM
namespace CommonHelpers {
#else
namespace CommonHelpers.WASM {
#endif

//**************************************************************************************************
public static partial class HUInt16 {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="HParseValueException" />
public static UInt16 HexParse(string src)
   { return HHexParser.Parse<UInt16>(src); }
/// <exception cref="HParseValueException" />
public static UInt16 HexParse(string src,UInt16 def)
   { return HHexParser.Parse(src,def); }

/// <exception cref="HParseValueException" />
public static UInt16 HexParse(string src,HHexParseOptions options)
   { return HHexParser.Parse<UInt16>(src,options); }
/// <exception cref="HParseValueException" />
public static UInt16 HexParse(string src,HHexParseOptions options,UInt16 def)
   { return HHexParser.Parse(src,options,def); }

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

public static bool TryHexParse(string src,out UInt16 dst)
   { return HHexParser.TryParse(src,out dst); }
public static bool TryHexParse(string src,UInt16 def,out UInt16 dst)
   { return HHexParser.TryParse(src,def,out dst); }

public static bool TryHexParse(string src,out UInt16 dst,out HParseValueException e)
   { return HHexParser.TryParse(src,out dst,out e); }
public static bool TryHexParse(string src,UInt16 def,out UInt16 dst,out HParseValueException e)
   { return HHexParser.TryParse(src,def,out dst,out e); }

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

public static bool TryHexParse(string src,HHexParseOptions options,out UInt16 dst)
   { return HHexParser.TryParse(src,options,out dst); }
public static bool TryHexParse(string src,HHexParseOptions options,UInt16 def,out UInt16 dst)
   { return HHexParser.TryParse(src,options,def,out dst); }

public static bool TryHexParse( string src, HHexParseOptions options,
                                out UInt16 dst, out HParseValueException e )
   { return HHexParser.TryParse(src,options,out dst,out e); }
public static bool TryHexParse( string src, HHexParseOptions options, UInt16 def,
                                out UInt16 dst, out HParseValueException e )
   { return HHexParser.TryParse(src,options,def,out dst,out e); }

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HUInt16
//**************************************************************************************************

} // CommonHelpers (.WASM)
