Applied codestyle to all .cs files

This commit is contained in:
Kwoth
2021-12-29 06:07:16 +01:00
parent 723447c7d4
commit 82000c97a4
543 changed files with 13221 additions and 14059 deletions

View File

@@ -5,7 +5,7 @@ namespace NadekoBot.Extensions;
public static class ArrayExtensions
{
/// <summary>
/// Create a new array from the old array + new element at the end
/// Create a new array from the old array + new element at the end
/// </summary>
/// <param name="input">Input array</param>
/// <param name="added">Item to add to the end of the output array</param>
@@ -14,18 +14,13 @@ public static class ArrayExtensions
public static T[] With<T>(this T[] input, T added)
{
var newCrs = new T[input.Length + 1];
Array.Copy(input,
0,
newCrs,
0,
input.Length
);
Array.Copy(input, 0, newCrs, 0, input.Length);
newCrs[input.Length] = added;
return newCrs;
}
/// <summary>
/// Creates a new array by applying the specified function to every element in the input array
/// Creates a new array by applying the specified function to every element in the input array
/// </summary>
/// <param name="arr">Array to modify</param>
/// <param name="f">Function to apply</param>
@@ -34,4 +29,4 @@ public static class ArrayExtensions
/// <returns>New array with updated elements</returns>
public static TOut[] Map<TIn, TOut>(this TIn[] arr, Func<TIn, TOut> f)
=> Array.ConvertAll(arr, x => f(x));
}
}