DOCUMENTATION: Added XML documentation to DiscImageChef.Helpers.

This commit is contained in:
2017-12-23 03:51:42 +00:00
parent c15207c053
commit eb1cd59a98
17 changed files with 687 additions and 437 deletions

View File

@@ -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();