mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
DOCUMENTATION: Added XML documentation to DiscImageChef.Helpers.
This commit is contained in:
@@ -31,12 +31,24 @@ namespace DiscImageChef
|
||||
{
|
||||
public static partial class ArrayHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Fills an array with the specified value
|
||||
/// </summary>
|
||||
/// <param name="destinationArray">Array</param>
|
||||
/// <param name="value">Value</param>
|
||||
/// <typeparam name="T">Array type</typeparam>
|
||||
public static void ArrayFill<T>(T[] destinationArray, T value)
|
||||
{
|
||||
// if called with a single value, wrap the value in an array and call the main function
|
||||
ArrayFill(destinationArray, new[] {value});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills an array with the contents of the specified array
|
||||
/// </summary>
|
||||
/// <param name="destinationArray">Array</param>
|
||||
/// <param name="value">Value</param>
|
||||
/// <typeparam name="T">Array type</typeparam>
|
||||
public static void ArrayFill<T>(T[] destinationArray, T[] value)
|
||||
{
|
||||
if(destinationArray == null) throw new ArgumentNullException(nameof(destinationArray));
|
||||
@@ -54,6 +66,12 @@ namespace DiscImageChef
|
||||
Array.Copy(destinationArray, 0, destinationArray, copyLength, destinationArray.Length - copyLength);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a byte array to its hexadecimal representation
|
||||
/// </summary>
|
||||
/// <param name="array">Byte array</param>
|
||||
/// <param name="upper"><c>true</c> to use uppercase</param>
|
||||
/// <returns></returns>
|
||||
public static string ByteArrayToHex(byte[] array, bool upper = false)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user