Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split extension methods into separate classes #161

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

Octol1ttle
Copy link
Member

This PR splits the extension methods contained in Extensions.cs into separate classes in the Octobot.Extensions namespace. This was done for multiple reasons:

  1. The Extensions.cs violates SRP (Single Responsibility Principle) - it takes upon itself every extension method for many types
  2. Having a separate class for each extended type is a standard practice - take a look at Remora.Discord or osu!
  3. Having all extension methods in one file makes it hard to find the method you want

@Octol1ttle Octol1ttle added the type: refactor/style Changes that improve code quality and styling without affecting functionality label Oct 12, 2023
@Octol1ttle Octol1ttle requested a review from a team as a code owner October 12, 2023 15:08
@pull-request-size pull-request-size bot added the size/L PRs that change 200-1000 lines. label Oct 12, 2023
@mctaylors mctaylors self-assigned this Oct 12, 2023
@Octol1ttle Octol1ttle enabled auto-merge (squash) October 12, 2023 15:36
@Octol1ttle Octol1ttle merged commit e6f53b1 into master Oct 12, 2023
2 checks passed
@Octol1ttle Octol1ttle deleted the split-extensions branch October 12, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L PRs that change 200-1000 lines. type: refactor/style Changes that improve code quality and styling without affecting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants