Skip to content

feat: add AddEasyScrutorForThisAssembly extension method#28

Merged
alexdresko merged 3 commits into
masterfrom
copilot/add-easy-scrutor-for-assembly
Jan 6, 2026
Merged

feat: add AddEasyScrutorForThisAssembly extension method#28
alexdresko merged 3 commits into
masterfrom
copilot/add-easy-scrutor-for-assembly

Conversation

Copilot AI commented Dec 19, 2025

Copy link
Copy Markdown

Adds a new extension method for scanning and registering services from only the calling assembly, providing a targeted alternative to scanning all dependency context assemblies.

Changes

  • New method: AddEasyScrutorForThisAssembly() uses Assembly.GetCallingAssembly() with Scrutor's FromAssemblies() to scan only the calling assembly
  • Test coverage: 10 tests covering all lifetime interfaces, scope behavior, duplicate prevention, and assembly targeting

Usage

// Scans only the assembly containing this call
builder.Services.AddEasyScrutorForThisAssembly();

// vs scanning all assemblies
builder.Services.AddEasyScrutor();

// vs filtering by name pattern
builder.Services.AddEasyScrutorForAssembliesStartingWith("MyApp");

Useful for improved startup performance and explicit service registration boundaries.

Original prompt

Create a new AddEasyScrutorForThisAssembly. include tests.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: alexdresko <333022+alexdresko@users.noreply.github.com>
Copilot AI changed the title [WIP] Add EasyScrutor for this assembly and include tests feat: add AddEasyScrutorForThisAssembly extension method Dec 19, 2025
Copilot AI requested a review from alexdresko December 19, 2025 05:14
@alexdresko
alexdresko marked this pull request as ready for review January 6, 2026 15:06
@codecov

codecov Bot commented Jan 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexdresko
alexdresko merged commit d8603f3 into master Jan 6, 2026
5 checks passed
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.

2 participants