Split Reflectify.cs into one file per type - #169
Merged
Conversation
Splits the single ~920-line Reflectify.cs into one file per type, matching the existing structure of the spec files: - TypeMetaDataExtensions.cs - TypeMemberExtensions.cs - TypeExtensions.cs - MemberInfoExtensions.cs - ParameterInfoExtensions.cs - PropertyInfoExtensions.cs - MemberKind.cs (MemberKind enum + MemberKindExtensions) - Reflector.cs (Reflector + nested OrderedPropertyCollection) Each file only keeps the using directives it actually needs. No packaging changes were required since .nuspec already includes source files via a *.cs glob rather than an explicit filename. Closes #165 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Closes #165.
Splits the single ~920-line
src/Reflectify/Reflectify.csinto one file per type, matching the structure the test project already uses (one spec file per extension class):TypeMetaDataExtensions.csTypeMemberExtensions.csTypeExtensions.csMemberInfoExtensions.csParameterInfoExtensions.csPropertyInfoExtensions.csMemberKind.cs(MemberKindenum +MemberKindExtensions)Reflector.cs(Reflector+ nestedOrderedPropertyCollection)Notes
usingdirectives it actually needs, so no unused-usings warnings (the project treats warnings as errors)..nuspecalready references source files via a*.csglob rather than the explicitReflectify.csfilename, so all eight new files are picked up automatically.Testing
dotnet build(full solution, Release) — succeeds with 0 warnings/errors.dotnet test tests\Reflectify.Specs\Reflectify.Specs.csproj -c Release --framework net8.0— 187/187 passed.