Skip to content

Commit 68e1d19

Browse files
committed
Code Cleanup
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
1 parent 4447c66 commit 68e1d19

327 files changed

Lines changed: 17612 additions & 17906 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/AaxDecrypter/AaxcDownloadMultiConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ protected override void OnInitialized()
4141
}
4242

4343

44-
protected async override Task<bool> Step_DownloadAndDecryptAudiobookAsync()
44+
protected override async Task<bool> Step_DownloadAndDecryptAudiobookAsync()
4545
{
4646
if (AaxFile is null) return false;
47-
47+
4848
try
4949
{
5050
await (AaxConversion = decryptMultiAsync(AaxFile, DownloadOptions.ChapterInfo));

Source/AaxDecrypter/AaxcDownloadSingleConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected override void OnInitialized()
4545
}
4646
}
4747

48-
protected async override Task<bool> Step_DownloadAndDecryptAudiobookAsync()
48+
protected override async Task<bool> Step_DownloadAndDecryptAudiobookAsync()
4949
{
5050
if (AaxFile is null) return false;
5151
outputTempFile = GetNewTempFilePath(DownloadOptions.OutputFormat.ToString());
@@ -56,7 +56,7 @@ protected async override Task<bool> Step_DownloadAndDecryptAudiobookAsync()
5656

5757
try
5858
{
59-
await (AaxConversion = decryptAsync(AaxFile, outputFile));
59+
await (AaxConversion = decryptAsync(AaxFile, outputFile));
6060

6161
return AaxConversion.IsCompletedSuccessfully;
6262
}

Source/AaxDecrypter/AudiobookDownloadBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected virtual long InputFilePosition
4545
private readonly string tempFilePath;
4646

4747
protected AudiobookDownloadBase(string outDirectory, string cacheDirectory, IDownloadOptions dlOptions)
48-
{
48+
{
4949
OutputDirectory = ArgumentValidator.EnsureNotNullOrWhiteSpace(outDirectory, nameof(outDirectory));
5050
DownloadOptions = ArgumentValidator.EnsureNotNull(dlOptions, nameof(dlOptions));
5151
DownloadOptions.DownloadSpeedChanged += (_, speed) => InputFileStream.SpeedLimit = speed;

Source/AaxDecrypter/AverageSpeed.cs

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using System;
22

3-
namespace AaxDecrypter
3+
namespace AaxDecrypter;
4+
5+
public class MultiConvertFileProperties
46
{
5-
public class MultiConvertFileProperties
6-
{
7-
public required string OutputFileName { get; set; }
8-
public int PartsPosition { get; set; }
9-
public int PartsTotal { get; set; }
10-
public string? Title { get; set; }
11-
public DateTime FileDate { get; } = DateTime.Now;
12-
}
7+
public required string OutputFileName { get; set; }
8+
public int PartsPosition { get; set; }
9+
public int PartsTotal { get; set; }
10+
public string? Title { get; set; }
11+
public DateTime FileDate { get; } = DateTime.Now;
1312
}

Source/AaxDecrypter/NetworkFileStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ public async Task BeginDownloadingAsync()
171171

172172
if (ContentLength != 0 && ContentLength != response.FileSize)
173173
throw new WebException($"Content length of 0x{response.FileSize:X10} differs from partially downloaded content length of 0x{ContentLength:X10}");
174-
174+
175175
ContentLength = response.FileSize;
176176

177177
_downloadedPiece = new EventWaitHandle(false, EventResetMode.AutoReset);
178178
//Hand off the client and the open request to the downloader to download and write data to file.
179-
DownloadTask = Task.Run(() => DownloadLoopInternal(client , response), _cancellationSource.Token);
179+
DownloadTask = Task.Run(() => DownloadLoopInternal(client, response), _cancellationSource.Token);
180180
}
181181

182182
private async Task DownloadLoopInternal(HttpClient client, BlockResponse blockResponse)

Source/AppScaffolding/AppScaffolding.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
43
<TargetFramework>net10.0</TargetFramework>

0 commit comments

Comments
 (0)