1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//! `AssemblyRef` table module.
//!
//! This module provides complete support for the ECMA-335 `AssemblyRef` metadata table (0x23),
//! which contains references to external assemblies required by the current assembly. It includes
//! raw table access, resolved data structures, collection types, and cryptographic hash support
//! for dependency analysis and verification.
//!
//! # Architecture
//!
//! The `AssemblyRef` module follows the standard dual variant pattern with raw and owned
//! representations. Raw entries contain unresolved heap indexes, while owned entries
//! provide fully resolved strings and blob data for immediate use.
//!
//! # Key Components
//!
//! - [`crate::metadata::tables::assemblyref::raw::AssemblyRefRaw`] - Raw table structure with unresolved heap indexes
//! - [`crate::metadata::tables::assemblyref::owned::AssemblyRef`] - Owned variant with resolved strings/blobs
//! - [`crate::metadata::tables::assemblyref::assemblyrefhash::AssemblyRefHash`] - Hash information for verification
//! - [`crate::metadata::tables::assemblyref::loader::AssemblyRefLoader`] - Internal loader for processing table data
//! - [`crate::metadata::tables::assemblyref::AssemblyRefMap`] - Token-based lookup map
//! - [`crate::metadata::tables::assemblyref::AssemblyRefList`] - Collection type for assembly references
//! - [`crate::metadata::tables::assemblyref::AssemblyRefRc`] - Reference-counted pointer
//!
//! # `AssemblyRef` Table Structure
//!
//! The `AssemblyRef` table contains dependency information with these fields:
//! - **Version**: Four-part version number (Major.Minor.Build.Revision)
//! - **Flags**: Assembly attributes (see [`crate::metadata::tables::assembly::AssemblyFlags`])
//! - **`PublicKeyOrToken`**: Strong name verification data
//! - **Name**: Simple assembly name (e.g., "mscorlib")
//! - **Culture**: Localization culture (empty for culture-neutral assemblies)
//! - **`HashValue`**: Optional hash of the referenced assembly
//!
//! # Dependency Resolution
//!
//! `AssemblyRef` entries are fundamental for understanding assembly dependencies and are used
//! during runtime assembly loading. Each entry provides the minimum information needed for
//! the .NET runtime to locate and verify external assemblies.
//!
//! # Integration
//!
//! This module integrates with:
//! - [`crate::metadata::tables`] - Core metadata table infrastructure
//! - [`crate::metadata::imports`] - Import resolution and dependency tracking
//! - [`crate::metadata::token`] - Token-based metadata references
//! - [`crate::metadata::loader`] - Metadata loading system
//!
//! # References
//!
//! - [ECMA-335 II.22.5](https://ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf) - `AssemblyRef` table specification
use SkipMap;
use Arc;
use crate;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// A map that holds the mapping of [`crate::metadata::token::Token`] to parsed [`crate::metadata::tables::assemblyref::AssemblyRef`]
///
/// Thread-safe concurrent map using skip list data structure for efficient lookups
/// and insertions. Used to cache resolved assembly references by their metadata tokens.
pub type AssemblyRefMap = ;
/// A vector that holds a list of [`crate::metadata::tables::assemblyref::AssemblyRef`] references
///
/// Thread-safe append-only vector for storing assembly reference collections. Uses atomic operations
/// for lock-free concurrent access and is optimized for scenarios with frequent reads.
pub type AssemblyRefList = ;
/// A reference-counted pointer to an [`crate::metadata::tables::assemblyref::AssemblyRef`]
///
/// Provides shared ownership and automatic memory management for assembly reference instances.
/// Multiple references can safely point to the same assembly reference data across threads.
pub type AssemblyRefRc = ;