---
title: Resolve the identity assembly
summary: Determine which assembly's simple name identifies the current system.
status: draft
owner: SAIF Platform Team
last_reviewed: 2026-10-02
library: SAIF.NetCore.SystemHash
reference_type: package
operation_id: OP-SH-04
trigger: Called internally by Get, or directly by a caller inspecting the resolved assembly.
---

# Resolve the identity assembly

Determines which `Assembly` instance's simple name will be used as the `systemName` in an identity hash — either the assembly injected at construction, or the calling assembly resolved at the call site.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SH-04 |
| **Trigger** | Internal delegation from [Get the current application's system hash](get-current-application-hash.md), or a direct call. |
| **Inputs** | none (reads constructor-injected `_assembly` field) |
| **Outputs** | `Assembly` instance |
| **Primary components** | `SystemHashService.GetAssembly` |
| **Entry point** | `src/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SystemHashService.cs` |

## Steps

1. If the stored constructor-supplied assembly is non-null (`_assembly != null`), return it ([BR-SH-06](../business-rules.md#br-sh-06-system-name-from-assembly)).
2. Otherwise, return `Assembly.GetCallingAssembly()` as evaluated at this method's own call site.
   - Because this method is called from within `Get`, the "calling assembly" at this point is `Get`'s own containing assembly (`SAIF.NetCore.SystemHash`), not the application that originally called `Get` — unless JIT inlining collapses the call stack.*

## Process flow

The following diagram shows how the identity assembly is resolved — from the constructor-injected assembly or the calling assembly — as the first step of credential issuance; it performs no hashing, salting, lifetime checking, or comparison.

```mermaid
flowchart TD
	Start([Resolve identity assembly]) --> Injected{"_assembly != null?"}
	Injected -->|Yes| ReturnInjected([Return stored constructor-supplied assembly])
	Injected -->|No| ReturnCalling([Return Assembly.GetCallingAssembly])
```

## Failure and edge-case behavior
- No exception is thrown in either branch; the ambiguity is a silent behavioral risk rather than a failure condition.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `src/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SAIF.NetCore.SystemHash/SystemHashService.cs`
