Skip to content

[08] feat(dotnet): model dependency injection registrations #15

Description

@fernandofielmann

Goal

Represent statically resolvable ASP.NET Core dependency-injection registrations and their lifetimes.

Scope

  • Recognize AddTransient, AddScoped, and AddSingleton generic registrations on IServiceCollection.
  • Cover statically resolvable non-generic Type overloads.
  • Resolve service and implementation types against the indexed type registry.
  • Emit RESOLVES_TO with lifetime, registration form, and source metadata.
  • Emit CONFIGURES from the registration method or startup root.
  • Preserve multiple registrations for the same service token.
  • Reject factories, reflection-based scans, and ambiguous implementation types unless they can be resolved safely.

Dependencies

Acceptance criteria

  • Generic and non-generic registrations are represented with correct lifetime.
  • Interface-to-implementation links resolve across project references from [01] feat(architecture): model application and project roots #9.
  • Multiple registrations remain distinct and deterministic.
  • Factory/scan-based registrations do not create guessed implementation links.
  • Sequential and parallel indexing produce equivalent relationships.
  • MCP schema, graph contracts, and README document RESOLVES_TO and DI-specific CONFIGURES semantics.

Validation

  • Add positive, negative, multiple-registration, ambiguity, factory, and parity fixtures.
  • Run C# extraction/LSP, edge, and convergence suites, lint-ci, and scripts/test.sh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions