Align .editorconfig files

When debugging only
app.Services.GetRequiredService<IPCRBService>();

Injected AppSettings instead of using GetEnvironmentVariable at Services level

Get ready to use VSCode IDE
This commit is contained in:
2024-12-03 12:23:56 -07:00
parent 89790f4fc1
commit 538b1f817e
72 changed files with 3420 additions and 391 deletions

View File

@ -398,4 +398,4 @@ public class ApprovalController : ControllerBase {
}
}
}
}
}

View File

@ -23,7 +23,7 @@ public class AuthenticationController : ControllerBase {
IAuthenticationService authenticationService) {
_logger = logger ?? throw new ArgumentNullException("ILogger not injected");
_monInClient = monInClient ?? throw new ArgumentNullException("IMonInWorkerClient not injected");
_authenticationService = authenticationService ??
_authenticationService = authenticationService ??
throw new ArgumentNullException("IAuthenticationService not injected");
}
@ -175,4 +175,4 @@ public class AuthenticationController : ControllerBase {
throw;
}
}
}
}

View File

@ -53,4 +53,4 @@ public class CAController : ControllerBase {
}
}
}
}
}

View File

@ -54,4 +54,4 @@ public class CustomerController : ControllerBase {
}
}
}
}
}

View File

@ -53,4 +53,4 @@ public class ECNController : ControllerBase {
}
}
}
}
}

View File

@ -1,4 +1,5 @@
using MesaFabApproval.API.Services;
using MesaFabApproval.Models;
using MesaFabApproval.Shared.Models;
using MesaFabApproval.Shared.Services;
@ -17,12 +18,14 @@ public class MRBController : ControllerBase {
private readonly string _mrbAttachmentPath;
public MRBController(ILogger<MRBController> logger, IMRBService mrbService, IMonInWorkerClient monInClient) {
public MRBController(ILogger<MRBController> logger,
IMRBService mrbService,
IMonInWorkerClient monInClient,
AppSettings appSettings) {
_logger = logger ?? throw new ArgumentNullException("ILogger not injected");
_mrbService = mrbService ?? throw new ArgumentNullException("IMRBService not injected");
_monInClient = monInClient ?? throw new ArgumentNullException("IMonInWorkerClient not injected");
_mrbAttachmentPath = Environment.GetEnvironmentVariable("FabApprovalMrbAttachmentPath") ??
throw new ArgumentNullException("FabApprovalMrbAttachmentPath environment variable not found");
_mrbAttachmentPath = appSettings.MrbAttachmentPath;
}
[HttpPost]
@ -523,7 +526,7 @@ public class MRBController : ControllerBase {
if (mrbNumber <= 0) throw new ArgumentException($"{mrbNumber} is not a valid MRB#");
List<MRBActionAttachment> attachments =
List<MRBActionAttachment> attachments =
(await _mrbService.GetAllActionAttachmentsForMRB(mrbNumber, bypassCache)).ToList();
return Ok(attachments);
@ -969,4 +972,4 @@ public class MRBController : ControllerBase {
}
}
}
}
}

View File

@ -1123,4 +1123,4 @@ public class PCRBController : ControllerBase {
}
}
}
}
}

View File

@ -220,4 +220,4 @@ public class UserController : ControllerBase {
}
}
}
}
}