Conversation
…gnmentListCommand Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
|
@copilot Double-check that Step 5 was done correctly. |
Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
Step 5 requires adding a changelog entry (Step 5.3 in the refactor plan). This was missing from the initial commit. Added the changelog entry in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors RoleAssignmentListCommand to use constructor dependency injection for IAuthorizationService instead of resolving it through context.GetService<T>() inside ExecuteAsync, following the established DI refactor pattern.
Changes:
RoleAssignmentListCommandnow acceptsIAuthorizationServicevia constructor injection- Tests updated to inject the service via constructor and share
_command,_context, and_commandDefinitionas fields - Changelog entry added for the change
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
RoleAssignmentListCommand.cs |
Adds IAuthorizationService constructor parameter; removes context.GetService<T>() call |
RoleAssignmentListCommandTests.cs |
Passes IAuthorizationService to command constructor; promotes shared state to fields |
1772484566722.yaml |
Changelog entry for the DI refactor |
...uthorization/tests/Azure.Mcp.Tools.Authorization.UnitTests/RoleAssignmentListCommandTests.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RoleAssignmentListCommandto injectIAuthorizationServicevia constructor instead ofcontext.GetService<T>()RoleAssignmentListCommandTeststo pass service via constructor and follow updated test patternNew-ChangelogEntry.ps1script (Step 5.3 from di-refactor-plan.md)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.