refactor(identity): split UserService into focused partial files#1186
Merged
Conversation
Split the 682-line UserService.cs into smaller, focused partial class files: - UserService.cs (~80 lines) - Core class with constructor and shared helpers - UserService.Registration.cs (~220 lines) - RegisterAsync, GetOrCreateFromPrincipalAsync - UserService.Profile.cs (~100 lines) - GetAsync, GetListAsync, UpdateAsync, existence checks - UserService.Lifecycle.cs (~115 lines) - DeleteAsync, ToggleStatusAsync - UserService.Roles.cs (~85 lines) - AssignRolesAsync, GetUserRolesAsync - UserService.Confirmation.cs (~50 lines) - ConfirmEmailAsync, ConfirmPhoneNumberAsync Existing partial files kept unchanged: - UserService.Password.cs (87 lines) - UserService.Permissions.cs (53 lines) No interface or method signature changes. Build verified with 0 errors, 0 warnings.
e44f766 to
1e6677d
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split the monolithic 682-line
UserService.csinto smaller, focused partial class files for better organization and maintainability.Changes
Split into the following partial files:
UserService.csEnsureValidTenant(),ResolveImageUrl()UserService.Registration.csRegisterAsync,GetOrCreateFromPrincipalAsyncUserService.Profile.csGetAsync,GetListAsync,GetCountAsync,UpdateAsync, existence checksUserService.Lifecycle.csDeleteAsync,ToggleStatusAsyncUserService.Roles.csAssignRolesAsync,GetUserRolesAsyncUserService.Confirmation.csConfirmEmailAsync,ConfirmPhoneNumberAsyncExisting partial files kept unchanged:
UserService.Password.cs(87 lines)UserService.Permissions.cs(53 lines)Verification
internal sealed partial class UserServiceFSH.Modules.Identity.Services