Skip to content

Split Reflectify.cs into one file per type - #169

Merged
dennisdoomen merged 1 commit into
mainfrom
split-reflectify-into-files
Aug 10, 2026
Merged

Split Reflectify.cs into one file per type#169
dennisdoomen merged 1 commit into
mainfrom
split-reflectify-into-files

Conversation

@dennisdoomen

Copy link
Copy Markdown
Owner

Summary

Closes #165.

Splits the single ~920-line src/Reflectify/Reflectify.cs into one file per type, matching the structure the test project already uses (one spec file per extension class):

  • TypeMetaDataExtensions.cs
  • TypeMemberExtensions.cs
  • TypeExtensions.cs
  • MemberInfoExtensions.cs
  • ParameterInfoExtensions.cs
  • PropertyInfoExtensions.cs
  • MemberKind.cs (MemberKind enum + MemberKindExtensions)
  • Reflector.cs (Reflector + nested OrderedPropertyCollection)

Notes

  • Each new file only keeps the using directives it actually needs, so no unused-usings warnings (the project treats warnings as errors).
  • No packaging changes were needed: .nuspec already references source files via a *.cs glob rather than the explicit Reflectify.cs filename, so all eight new files are picked up automatically.
  • No behavioral changes — this is a pure file split.

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.

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>
@github-actions

Copy link
Copy Markdown

Test Results

  4 files  ±0    4 suites  ±0   3m 51s ⏱️ +2s
187 tests ±0  187 ✅ ±0  0 💤 ±0  0 ❌ ±0 
743 runs  ±0  743 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d97657d. ± Comparison against base commit 6dbba80.

@dennisdoomen
dennisdoomen merged commit d63731a into main Aug 10, 2026
4 checks passed
@dennisdoomen
dennisdoomen deleted the split-reflectify-into-files branch August 10, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Split Reflectify.cs into one file per type

1 participant