diff --git a/.editorconfig b/.editorconfig index d05495c2..8b93976f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -95,7 +95,6 @@ dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_s dotnet_naming_symbols.instance_fields.applicable_kinds = field dotnet_naming_style.instance_field_style.capitalization = camel_case -dotnet_naming_style.instance_field_style.required_prefix = _ # Locals and parameters are camelCase dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion @@ -124,20 +123,6 @@ dotnet_naming_symbols.all_members.applicable_kinds = * dotnet_naming_style.pascal_case_style.capitalization = pascal_case -# Async methods should have "Async" suffix -dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods -dotnet_naming_rule.async_methods_end_in_async.style = end_in_async -dotnet_naming_rule.async_methods_end_in_async.severity = warning - -dotnet_naming_symbols.any_async_methods.applicable_kinds = method -dotnet_naming_symbols.any_async_methods.applicable_accessibilities = * -dotnet_naming_symbols.any_async_methods.required_modifiers = async - -dotnet_naming_style.end_in_async.required_prefix = -dotnet_naming_style.end_in_async.required_suffix = Async -dotnet_naming_style.end_in_async.capitalization = pascal_case -dotnet_naming_style.end_in_async.word_separator = - # error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}' dotnet_diagnostic.RS2008.severity = none diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index e9fe25aa..e68a3a02 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -110,7 +110,7 @@ namespace DepotDownloader IEnumerable licenseQuery; if (steam3.steamUser.SteamID.AccountType == EAccountType.AnonUser) { - licenseQuery = new List { 17906 }; + licenseQuery = [17906]; } else { @@ -610,16 +610,16 @@ namespace DepotDownloader private class GlobalDownloadCounter { - public ulong TotalBytesCompressed; - public ulong TotalBytesUncompressed; + public ulong totalBytesCompressed; + public ulong totalBytesUncompressed; } private class DepotDownloadCounter { - public ulong CompleteDownloadSize; - public ulong SizeDownloaded; - public ulong DepotBytesCompressed; - public ulong DepotBytesUncompressed; + public ulong completeDownloadSize; + public ulong sizeDownloaded; + public ulong depotBytesCompressed; + public ulong depotBytesUncompressed; } private static async Task DownloadSteam3Async(List depots) @@ -666,7 +666,7 @@ namespace DepotDownloader } Console.WriteLine("Total downloaded: {0} bytes ({1} bytes uncompressed) from {2} depots", - downloadCounter.TotalBytesCompressed, downloadCounter.TotalBytesUncompressed, depots.Count); + downloadCounter.totalBytesCompressed, downloadCounter.totalBytesUncompressed, depots.Count); } private static async Task ProcessDepotManifestAndFiles(CancellationTokenSource cts, DepotDownloadInfo depot) @@ -889,7 +889,7 @@ namespace DepotDownloader Directory.CreateDirectory(Path.GetDirectoryName(fileFinalPath)); Directory.CreateDirectory(Path.GetDirectoryName(fileStagingPath)); - depotCounter.CompleteDownloadSize += file.TotalSize; + depotCounter.completeDownloadSize += file.TotalSize; } }); @@ -961,7 +961,7 @@ namespace DepotDownloader DepotConfigStore.Instance.InstalledManifestIDs[depot.DepotId] = depot.ManifestId; DepotConfigStore.Save(); - Console.WriteLine("Depot {0} - Downloaded {1} bytes ({2} bytes uncompressed)", depot.DepotId, depotCounter.DepotBytesCompressed, depotCounter.DepotBytesUncompressed); + Console.WriteLine("Depot {0} - Downloaded {1} bytes ({2} bytes uncompressed)", depot.DepotId, depotCounter.depotBytesCompressed, depotCounter.depotBytesUncompressed); } private static void DownloadSteam3AsyncDepotFile( @@ -1124,8 +1124,8 @@ namespace DepotDownloader { lock (depotDownloadCounter) { - depotDownloadCounter.SizeDownloaded += file.TotalSize; - Console.WriteLine("{0,6:#00.00}% {1}", (depotDownloadCounter.SizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, fileFinalPath); + depotDownloadCounter.sizeDownloaded += file.TotalSize; + Console.WriteLine("{0,6:#00.00}% {1}", (depotDownloadCounter.sizeDownloaded / (float)depotDownloadCounter.completeDownloadSize) * 100.0f, fileFinalPath); } return; @@ -1134,7 +1134,7 @@ namespace DepotDownloader var sizeOnDisk = (file.TotalSize - (ulong)neededChunks.Select(x => (long)x.UncompressedLength).Sum()); lock (depotDownloadCounter) { - depotDownloadCounter.SizeDownloaded += sizeOnDisk; + depotDownloadCounter.sizeDownloaded += sizeOnDisk; } } @@ -1271,22 +1271,22 @@ namespace DepotDownloader ulong sizeDownloaded = 0; lock (depotDownloadCounter) { - sizeDownloaded = depotDownloadCounter.SizeDownloaded + (ulong)chunkData.Data.Length; - depotDownloadCounter.SizeDownloaded = sizeDownloaded; - depotDownloadCounter.DepotBytesCompressed += chunk.CompressedLength; - depotDownloadCounter.DepotBytesUncompressed += chunk.UncompressedLength; + sizeDownloaded = depotDownloadCounter.sizeDownloaded + (ulong)chunkData.Data.Length; + depotDownloadCounter.sizeDownloaded = sizeDownloaded; + depotDownloadCounter.depotBytesCompressed += chunk.CompressedLength; + depotDownloadCounter.depotBytesUncompressed += chunk.UncompressedLength; } lock (downloadCounter) { - downloadCounter.TotalBytesCompressed += chunk.CompressedLength; - downloadCounter.TotalBytesUncompressed += chunk.UncompressedLength; + downloadCounter.totalBytesCompressed += chunk.CompressedLength; + downloadCounter.totalBytesUncompressed += chunk.UncompressedLength; } if (remainingChunks == 0) { var fileFinalPath = Path.Combine(depot.InstallDir, file.FileName); - Console.WriteLine("{0,6:#00.00}% {1}", (sizeDownloaded / (float)depotDownloadCounter.CompleteDownloadSize) * 100.0f, fileFinalPath); + Console.WriteLine("{0,6:#00.00}% {1}", (sizeDownloaded / (float)depotDownloadCounter.completeDownloadSize) * 100.0f, fileFinalPath); } }