Skip to content

Commit 2e9c7a4

Browse files
committed
fix: Styling
1 parent 3798893 commit 2e9c7a4

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tools/LinkDotNet.Blog.UpgradeAssistant/MigrationManager.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ namespace LinkDotNet.Blog.UpgradeAssistant;
66

77
public sealed class MigrationManager
88
{
9-
private readonly List<IMigration> _migrations;
10-
private readonly string _currentVersion;
9+
private readonly List<IMigration> migrations;
10+
private readonly string currentVersion;
1111

1212
public MigrationManager(IEnumerable<IMigration> migrations)
1313
{
14-
_migrations = migrations.ToList();
15-
_currentVersion = DetermineCurrentVersionFromMigrations();
14+
this.migrations = migrations.ToList();
15+
currentVersion = DetermineCurrentVersionFromMigrations();
1616
}
1717

1818
private string DetermineCurrentVersionFromMigrations()
1919
{
20-
return _migrations.Count > 0
21-
? _migrations.Max(m => m.ToVersion) ?? "11.0"
20+
return migrations.Count > 0
21+
? migrations.Max(m => m.ToVersion) ?? "11.0"
2222
: "11.0";
2323
}
2424

@@ -53,7 +53,7 @@ public async Task<bool> MigrateFileAsync(string filePath, bool dryRun, string ba
5353
}
5454

5555
var currentVersion = GetVersion(document);
56-
ConsoleOutput.WriteInfo($"Current version: {currentVersion ?? $"Not set (pre-{_currentVersion})"}");
56+
ConsoleOutput.WriteInfo($"Current version: {currentVersion ?? $"Not set (pre-{this.currentVersion})"}");
5757

5858
var applicableMigrations = GetApplicableMigrations(currentVersion);
5959

@@ -102,7 +102,7 @@ public async Task<bool> MigrateFileAsync(string filePath, bool dryRun, string ba
102102

103103
if (hasAnyChanges)
104104
{
105-
modifiedContent = SetVersion(modifiedContent, _currentVersion);
105+
modifiedContent = SetVersion(modifiedContent, this.currentVersion);
106106

107107
if (!dryRun)
108108
{
@@ -145,7 +145,7 @@ private List<IMigration> GetApplicableMigrations(string? currentVersion)
145145
while (foundMigration)
146146
{
147147
foundMigration = false;
148-
foreach (var migration in _migrations)
148+
foreach (var migration in migrations)
149149
{
150150
if (migration.FromVersion == currentMigrationVersion)
151151
{

0 commit comments

Comments
 (0)