Skip to content

Commit 7ee5e14

Browse files
Add default values for parameters in Benchmark and Utils
- Modified `ConsumeAsync` in `Benchmark` to include a default value for the `cancellationToken` parameter. - Updated XML documentation for `GetByteArray` to indicate the `sizeInKb` parameter defaults to 1 kilobyte. - Updated `GetByteArray` method signature to provide a default value of 1 for the `sizeInKb` parameter.
1 parent 6e15eb6 commit 7ee5e14

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • source/Benchmarking/dotNetTips.Spargine.8.Benchmarking

source/Benchmarking/dotNetTips.Spargine.8.Benchmarking/Benchmark.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ protected Benchmark()
215215
/// <summary>
216216
/// Generates a random byte array of a specified size in kilobytes. If the byte array of the requested size has already been generated, it retrieves the cached version to avoid regeneration.
217217
/// </summary>
218-
/// <param name="sizeInKb">The size of the byte array to generate, in kilobytes.</param>
218+
/// <param name="sizeInKb">The size of the byte array to generate, in kilobytes. Defaults to 1.</param>
219219
/// <returns>A byte array of the specified size.</returns>
220-
public byte[] GetByteArray(int sizeInKb)
220+
public byte[] GetByteArray(int sizeInKb = 1)
221221
{
222222
sizeInKb = sizeInKb.EnsureMinimum(1);
223223

0 commit comments

Comments
 (0)