Skip to content

Commit 0044cc0

Browse files
committed
Remove #region usage and fix code formatting
- Replace #region/#endregion with section comments in 4 source files: MonkeysAudioFile.cs, MusepackFile.cs, OggFlacFile.cs, WavPackFile.cs - Fix whitespace formatting in HighResolutionAudioTests.cs
1 parent 27413b3 commit 0044cc0

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

src/TagLibSharp2/Ape/MonkeysAudioFile.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ private static int FindAudioEnd (ReadOnlySpan<byte> data)
408408
return data.Length - (int)totalTagSize;
409409
}
410410

411-
#region File I/O
411+
// ===== File I/O =====
412412

413413
/// <summary>
414414
/// Read a Monkey's Audio file from disk.
@@ -496,8 +496,6 @@ public async Task<FileWriteResult> SaveToFileAsync (
496496
return await SaveToFileAsync (_sourcePath!, fileSystem, cancellationToken).ConfigureAwait (false);
497497
}
498498

499-
#endregion
500-
501499
/// <summary>
502500
/// Releases resources held by this instance.
503501
/// </summary>

src/TagLibSharp2/Musepack/MusepackFile.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ private static int FindAudioEnd (ReadOnlySpan<byte> data)
437437
return data.Length - (int)totalTagSize;
438438
}
439439

440-
#region File I/O
440+
// ===== File I/O =====
441441

442442
/// <summary>
443443
/// Read a Musepack file from disk.
@@ -525,8 +525,6 @@ public async Task<FileWriteResult> SaveToFileAsync (
525525
return await SaveToFileAsync (_sourcePath!, fileSystem, cancellationToken).ConfigureAwait (false);
526526
}
527527

528-
#endregion
529-
530528
/// <summary>
531529
/// Releases resources held by this instance.
532530
/// </summary>

src/TagLibSharp2/Ogg/OggFlacFile.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public static OggFlacHeaderInfo Failure (string error)
513513
=> new (false, null, 0, 0, error);
514514
}
515515

516-
#region File I/O
516+
// ===== File I/O =====
517517

518518
/// <summary>
519519
/// Read an Ogg FLAC file from disk.
@@ -601,8 +601,6 @@ public async Task<FileWriteResult> SaveToFileAsync (
601601
return await SaveToFileAsync (_sourcePath!, fileSystem, cancellationToken).ConfigureAwait (false);
602602
}
603603

604-
#endregion
605-
606604
private readonly struct ExtractPacketResult
607605
{
608606
public bool IsSuccess { get; }

src/TagLibSharp2/WavPack/WavPackFile.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ private static int FindAudioEnd (ReadOnlySpan<byte> data)
428428
return data.Length - (int)totalTagSize;
429429
}
430430

431-
#region File I/O
431+
// ===== File I/O =====
432432

433433
/// <summary>
434434
/// Read a WavPack file from disk.
@@ -516,8 +516,6 @@ public async Task<FileWriteResult> SaveToFileAsync (
516516
return await SaveToFileAsync (_sourcePath!, fileSystem, cancellationToken).ConfigureAwait (false);
517517
}
518518

519-
#endregion
520-
521519
/// <summary>
522520
/// Releases resources held by this instance.
523521
/// </summary>

tests/TagLibSharp2.Tests/Riff/HighResolutionAudioTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ static BinaryData CreateWaveFormatExtensible (
160160
if (subFormat == WavSubFormat.Pcm) {
161161
// KSDATAFORMAT_SUBTYPE_PCM: 00000001-0000-0010-8000-00aa00389b71
162162
ReadOnlySpan<byte> pcmGuid = [0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
163-
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71];
163+
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71];
164164
builder.Add (pcmGuid);
165165
} else if (subFormat == WavSubFormat.IeeeFloat) {
166166
// KSDATAFORMAT_SUBTYPE_IEEE_FLOAT: 00000003-0000-0010-8000-00aa00389b71
167167
ReadOnlySpan<byte> floatGuid = [0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
168-
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71];
168+
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71];
169169
builder.Add (floatGuid);
170170
} else {
171171
builder.AddZeros (16);

0 commit comments

Comments
 (0)