BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.Helper.GeneralHelper Class Referenceabstract

Various helper functions of very general utility. More...

Static Public Member Functions

static string FormatBytesToHRF (long bytes, bool useSI=true)
 Format byte (B) to Human-Readable-Form.
 
static string FormatBitrateToHRF (long bits, bool useSI=true)
 Format bitrate (bit/s) to Human-Readable-Form.
 
static string FormatSecondsToHRF< T > (T seconds)
 Format seconds to Human-Readable-Form.
 
static ? string GetCLIArgument (string name, params string[]? args)
 Returns a CLI argument for a name from the command line.
 
static string[] GetCLIArguments ()
 Returns all CLI arguments.
 

Detailed Description

Various helper functions of very general utility.

Member Function Documentation

◆ FormatBitrateToHRF()

static string BogaNet.Helper.GeneralHelper.FormatBitrateToHRF ( long bits,
bool useSI = true )
static

Format bitrate (bit/s) to Human-Readable-Form.

Parameters
bitsBitrate in bit/s
useSIUse SI-system (optional, default: true)
Returns
Formatted bitrate in Human-Readable-Form

◆ FormatBytesToHRF()

static string BogaNet.Helper.GeneralHelper.FormatBytesToHRF ( long bytes,
bool useSI = true )
static

Format byte (B) to Human-Readable-Form.

Parameters
bytesValue in bytes
useSIUse SI-system (optional, default: true)
Returns
Formatted byte-value in Human-Readable-Form

◆ FormatSecondsToHRF< T >()

static string BogaNet.Helper.GeneralHelper.FormatSecondsToHRF< T > ( T seconds)
static

Format seconds to Human-Readable-Form.

Parameters
secondsValue in seconds
Returns
Formatted seconds in Human-Readable-Form
Type Constraints
T :INumber<T> 

◆ GetCLIArgument()

static ? string BogaNet.Helper.GeneralHelper.GetCLIArgument ( string name,
params string?[] args )
static

Returns a CLI argument for a name from the command line.

Parameters
nameName for the argument
argsArguments to search for (optional)
Returns
Argument for a name from the command line
Exceptions
ArgumentNullException

◆ GetCLIArguments()

static string[] BogaNet.Helper.GeneralHelper.GetCLIArguments ( )
static

Returns all CLI arguments.

Returns
Arguments from the command line

The documentation for this class was generated from the following file: