qol: inline variable declaration

This commit is contained in:
Gary Sharp
2025-07-20 15:12:33 +10:00
parent 5792771ea1
commit 1add4ee0f5
89 changed files with 1229 additions and 1512 deletions
+1 -2
View File
@@ -53,14 +53,13 @@ namespace Disco.Services.Jobs
public override Task OnConnected()
{
int jobId;
string jobIdParam;
jobIdParam = Context.QueryString["JobId"];
if (string.IsNullOrWhiteSpace(jobIdParam))
throw new ArgumentNullException("JobId");
if (!int.TryParse(jobIdParam, out jobId))
if (!int.TryParse(jobIdParam, out var jobId))
throw new ArgumentException("An integer was expected", "JobId");
var userAuth = UserService.GetAuthorization(Context.User.Identity.Name);