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, 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¶
- If the stored constructor-supplied assembly is non-null (
_assembly != null), return it (BR-SH-06). - 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 isGet's own containing assembly (SAIF.NetCore.SystemHash), not the application that originally calledGet— 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.
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¶
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