# DependencyInjection

- File ID: file:qieb5i:dependencyinjection-cs
- Path: NexusReader.Application/DependencyInjection.cs
- Role: service-registration
- Layer: application

## Purpose

Provides Application-layer dependency registrations (mappings, MediatR) and exposes the assembly for registration discovery.

## Key Details

This static helper centralizes Application-layer DI registration: it wires mapping configuration and asks MediatR to register handlers from the assembly exposed by the Assembly property.

## Symbols

- DependencyInjection: Provides Application-layer dependency registrations (mappings, MediatR) and exposes the assembly for registration discovery.
- AddApplication(): Extension method that registers application-layer services: Mapster mapping configuration and MediatR handlers, then returns the IServiceCollection.
- Assembly (property getter): Exposes the assembly containing the DependencyInjection type for registration/discovery.

## Dependencies

- No resolved dependencies.

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: NexusReader.Application/Mappings
- call-target: NexusReader.Application/Mappings

## Coverage

- Symbols: 3
- Executable symbols: 2
- Executable symbols with control flow: 2
- Grounded edges: 3
- Unresolved references: 2
- Control-flow fragments: 2
- Unresolved jumps: 1
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 3

## Control Flow Fragments

- AddApplication: 6 nodes, 5 edges, 1 jumps, 0 unsupported constructs
- Assembly (property getter): 2 nodes, 1 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### DependencyInjection Neighborhood

```mermaid
flowchart LR
    class_5jkcay_dependencyinjection("DependencyInjection")
    file_qieb5i_dependencyinjection_cs("DependencyInjection")
    method_lhrad4_assembly_property_getter[["Assembly (property getter)"]]
    method_zf4i3h_addapplication[["AddApplication()"]]
```

### DependencyInjection Execution Overview

```mermaid
flowchart TD
    class_5jkcay_dependencyinjection("DependencyInjection")
    method_lhrad4_assembly_property_getter[["Assembly (property getter)"]]
    method_zf4i3h_addapplication[["AddApplication()"]]
    unresolved_unresolved_1oo5v1s_call_target{"Unresolved: AddMapsterConfiguration"}
    class_5jkcay_dependencyinjection -->|contains| method_lhrad4_assembly_property_getter
    class_5jkcay_dependencyinjection -->|contains| method_zf4i3h_addapplication
    method_zf4i3h_addapplication -->|unresolved call| unresolved_unresolved_1oo5v1s_call_target
```

### AddApplication() Control Flow

```mermaid
flowchart TD
    method_zf4i3h_addapplication__call_10_AddMapsterConfiguration[["AddMapsterConfiguration"]]
    method_zf4i3h_addapplication__action_10_service_registration_10__linear("Adds Mapster configuration to DI")
    method_zf4i3h_addapplication__action_11_service_registration_11__linear("Registers MediatR and handlers from this assembly")
    method_zf4i3h_addapplication__entry(["AddApplication entry"])
    method_zf4i3h_addapplication__action_13_addapplication_return_13_0__return(["Returns result"])
    method_zf4i3h_addapplication__action_13_return_13__return(["Returns IServiceCollection"])
    method_zf4i3h_addapplication__action_10_service_registration_10__linear -->|this IServiceCollection extension call to add mapping configuration| method_zf4i3h_addapplication__call_10_AddMapsterConfiguration
    method_zf4i3h_addapplication__action_11_service_registration_11__linear -->|return| method_zf4i3h_addapplication__action_13_addapplication_return_13_0__return
    method_zf4i3h_addapplication__action_13_addapplication_return_13_0__return -->|return| method_zf4i3h_addapplication__action_13_return_13__return
    method_zf4i3h_addapplication__call_10_AddMapsterConfiguration -->|next| method_zf4i3h_addapplication__action_11_service_registration_11__linear
    method_zf4i3h_addapplication__entry -->|next| method_zf4i3h_addapplication__action_10_service_registration_10__linear
```

## Diagram Validation

- Status: warn
- Warning: Control-flow extraction left 1 unresolved jumps.
