Skip to content

Commit 9581c09

Browse files
committed
Remove params keyword from extension methods to fix CS8620 and Rider warnings
1 parent 5255dd9 commit 9581c09

File tree

15 files changed

+39
-39
lines changed

15 files changed

+39
-39
lines changed

application/AppGateway/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
);
3737
}
3838

39-
builder.AddNamedBlobStorages(("account-management-storage", "ACCOUNT_MANAGEMENT_STORAGE_URL"));
39+
builder.AddNamedBlobStorages([("account-management-storage", "ACCOUNT_MANAGEMENT_STORAGE_URL")]);
4040

4141
builder.WebHost.UseKestrel(option => option.AddServerHeader = false);
4242

application/account-management/Api/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// Configure dependency injection services like Repositories, MediatR, Pipelines, FluentValidation validators, etc.
1414
builder.Services
15-
.AddApiServices(Assembly.GetExecutingAssembly(), Configuration.Assembly)
15+
.AddApiServices([Assembly.GetExecutingAssembly(), Configuration.Assembly])
1616
.AddAccountManagementServices()
1717
.AddSinglePageAppFallback();
1818

application/account-management/Core/Configuration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public IHostApplicationBuilder AddAccountManagementInfrastructure()
1818
// Infrastructure is configured separately from other Infrastructure services to allow mocking in tests
1919
return builder
2020
.AddSharedInfrastructure<AccountManagementDbContext>("account-management-database")
21-
.AddNamedBlobStorages(("account-management-storage", "BLOB_STORAGE_URL"));
21+
.AddNamedBlobStorages([("account-management-storage", "BLOB_STORAGE_URL")]);
2222
}
2323
}
2424

@@ -34,7 +34,7 @@ public IServiceCollection AddAccountManagementServices()
3434
);
3535

3636
return services
37-
.AddSharedServices<AccountManagementDbContext>(Assembly)
37+
.AddSharedServices<AccountManagementDbContext>([Assembly])
3838
.AddScoped<AvatarUpdater>()
3939
.AddScoped<UserInfoFactory>();
4040
}

application/account-management/Tests/Authentication/CompleteLoginTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public async Task CompleteLogin_WhenValid_ShouldCompleteLoginAndCreateTokens()
3636
// Assert
3737
await response.ShouldBeSuccessfulPostRequest(hasLocation: false);
3838
var updatedLoginCount = Connection.ExecuteScalar<long>(
39-
"SELECT COUNT(*) FROM Logins WHERE Id = @id AND Completed = 1", new { id = loginId.ToString() }
39+
"SELECT COUNT(*) FROM Logins WHERE Id = @id AND Completed = 1", [new { id = loginId.ToString() }]
4040
);
4141
updatedLoginCount.Should().Be(1);
4242

@@ -82,9 +82,9 @@ public async Task CompleteLogin_WhenInvalidOneTimePassword_ShouldReturnBadReques
8282
await response.ShouldHaveErrorStatusCode(HttpStatusCode.BadRequest, "The code is wrong or no longer valid.");
8383

8484
// Verify retry count increment and event collection
85-
var loginCompleted = Connection.ExecuteScalar<long>("SELECT Completed FROM Logins WHERE Id = @id", new { id = loginId.ToString() });
85+
var loginCompleted = Connection.ExecuteScalar<long>("SELECT Completed FROM Logins WHERE Id = @id", [new { id = loginId.ToString() }]);
8686
loginCompleted.Should().Be(0);
87-
var updatedRetryCount = Connection.ExecuteScalar<long>("SELECT RetryCount FROM EmailConfirmations WHERE Id = @id", new { id = emailConfirmationId.ToString() });
87+
var updatedRetryCount = Connection.ExecuteScalar<long>("SELECT RetryCount FROM EmailConfirmations WHERE Id = @id", [new { id = emailConfirmationId.ToString() }]);
8888
updatedRetryCount.Should().Be(1);
8989

9090
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(2);
@@ -130,11 +130,11 @@ public async Task CompleteLogin_WhenRetryCountExceeded_ShouldReturnForbidden()
130130

131131
// Verify retry count increment and event collection
132132
var loginCompleted = Connection.ExecuteScalar<long>(
133-
"SELECT Completed FROM Logins WHERE Id = @id", new { id = loginId.ToString() }
133+
"SELECT Completed FROM Logins WHERE Id = @id", [new { id = loginId.ToString() }]
134134
);
135135
loginCompleted.Should().Be(0);
136136
var updatedRetryCount = Connection.ExecuteScalar<long>(
137-
"SELECT RetryCount FROM EmailConfirmations WHERE Id = @id", new { id = emailConfirmationId.ToString() }
137+
"SELECT RetryCount FROM EmailConfirmations WHERE Id = @id", [new { id = emailConfirmationId.ToString() }]
138138
);
139139
updatedRetryCount.Should().Be(4);
140140

@@ -215,7 +215,7 @@ public async Task CompleteLogin_WhenUserInviteCompleted_ShouldTrackUserInviteAcc
215215
// Assert
216216
Connection.ExecuteScalar<long>(
217217
"SELECT COUNT(*) FROM Users WHERE TenantId = @tenantId AND Email = @email AND EmailConfirmed = 1",
218-
new { tenantId = DatabaseSeeder.Tenant1.Id.ToString(), email = email.ToLower() }
218+
[new { tenantId = DatabaseSeeder.Tenant1.Id.ToString(), email = email.ToLower() }]
219219
).Should().Be(1);
220220

221221
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(3);

application/account-management/Tests/Authentication/SwitchTenantTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public async Task SwitchTenant_WhenUserEmailNotConfirmed_ShouldConfirmEmail()
189189
// Verify that the user's email is now confirmed
190190
var emailConfirmed = Connection.ExecuteScalar<long>(
191191
"SELECT EmailConfirmed FROM Users WHERE Id = @Id",
192-
new { Id = user2Id.ToString() }
192+
[new { Id = user2Id.ToString() }]
193193
);
194194
emailConfirmed.Should().Be(1); // SQLite stores boolean as 0/1
195195
}
@@ -257,23 +257,23 @@ public async Task SwitchTenant_WhenAcceptingInvite_ShouldCopyProfileData()
257257
// Verify profile data was copied
258258
var firstName = Connection.ExecuteScalar<string>(
259259
"SELECT FirstName FROM Users WHERE Id = @Id",
260-
new { Id = user2Id.ToString() }
260+
[new { Id = user2Id.ToString() }]
261261
);
262262
var lastName = Connection.ExecuteScalar<string>(
263263
"SELECT LastName FROM Users WHERE Id = @Id",
264-
new { Id = user2Id.ToString() }
264+
[new { Id = user2Id.ToString() }]
265265
);
266266
var title = Connection.ExecuteScalar<string>(
267267
"SELECT Title FROM Users WHERE Id = @Id",
268-
new { Id = user2Id.ToString() }
268+
[new { Id = user2Id.ToString() }]
269269
);
270270
var locale = Connection.ExecuteScalar<string>(
271271
"SELECT Locale FROM Users WHERE Id = @Id",
272-
new { Id = user2Id.ToString() }
272+
[new { Id = user2Id.ToString() }]
273273
);
274274
var emailConfirmed = Connection.ExecuteScalar<long>(
275275
"SELECT EmailConfirmed FROM Users WHERE Id = @Id",
276-
new { Id = user2Id.ToString() }
276+
[new { Id = user2Id.ToString() }]
277277
);
278278

279279
firstName.Should().Be(currentFirstName);

application/account-management/Tests/Signups/CompleteSignupTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public async Task CompleteSignup_WhenValid_ShouldCreateTenantAndOwnerUser()
4040

4141
// Assert
4242
await response.ShouldBeSuccessfulPostRequest(hasLocation: false);
43-
Connection.ExecuteScalar<long>("SELECT COUNT(*) FROM Users WHERE Email = @email", new { email = email.ToLower() }).Should().Be(1);
43+
Connection.ExecuteScalar<long>("SELECT COUNT(*) FROM Users WHERE Email = @email", [new { email = email.ToLower() }]).Should().Be(1);
4444

4545
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(4);
4646
TelemetryEventsCollectorSpy.CollectedEvents[0].GetType().Name.Should().Be("SignupStarted");

application/account-management/Tests/Users/DeclineInvitationTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public async Task DeclineInvitation_WhenValidInviteExists_ShouldDeleteUserAndCol
5858
response.ShouldHaveEmptyHeaderAndLocationOnSuccess();
5959
Connection.ExecuteScalar<long>(
6060
"SELECT COUNT(*) FROM Users WHERE Id = @userId",
61-
new { userId = userId.ToString() }
61+
[new { userId = userId.ToString() }]
6262
).Should().Be(0);
6363

6464
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(1);
@@ -154,11 +154,11 @@ public async Task DeclineInvitation_WhenMultipleInvitesExist_ShouldDeclineSpecif
154154
response.ShouldHaveEmptyHeaderAndLocationOnSuccess();
155155
Connection.ExecuteScalar<long>(
156156
"SELECT COUNT(*) FROM Users WHERE Id = @userId",
157-
new { userId = userId2.ToString() }
157+
[new { userId = userId2.ToString() }]
158158
).Should().Be(0);
159159
Connection.ExecuteScalar<long>(
160160
"SELECT COUNT(*) FROM Users WHERE Id = @userId",
161-
new { userId = userId3.ToString() }
161+
[new { userId = userId3.ToString() }]
162162
).Should().Be(1);
163163

164164
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(1);

application/account-management/Tests/Users/InviteUserTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public async Task InviteUser_WhenTenantHasName_ShouldCreateUserAndUseTenantNameI
5151
// Verify user was created
5252
Connection.ExecuteScalar<long>(
5353
"SELECT COUNT(*) FROM Users WHERE TenantId = @tenantId AND Email = @email AND EmailConfirmed = 0",
54-
new { tenantId = DatabaseSeeder.Tenant1.Id.ToString(), email = email.ToLower() }
54+
[new { tenantId = DatabaseSeeder.Tenant1.Id.ToString(), email = email.ToLower() }]
5555
).Should().Be(1);
5656

5757
TelemetryEventsCollectorSpy.CollectedEvents.Count.Should().Be(2);

application/back-office/Api/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// Configure dependency injection services like Repositories, MediatR, Pipelines, FluentValidation validators, etc.
1414
builder.Services
15-
.AddApiServices(Assembly.GetExecutingAssembly(), Configuration.Assembly)
15+
.AddApiServices([Assembly.GetExecutingAssembly(), Configuration.Assembly])
1616
.AddBackOfficeServices()
1717
.AddSinglePageAppFallback();
1818

application/back-office/Core/Configuration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public IHostApplicationBuilder AddBackOfficeInfrastructure()
2222
{
2323
public IServiceCollection AddBackOfficeServices()
2424
{
25-
return services.AddSharedServices<BackOfficeDbContext>(Assembly);
25+
return services.AddSharedServices<BackOfficeDbContext>([Assembly]);
2626
}
2727
}
2828
}

0 commit comments

Comments
 (0)