Data Structures | |
| class | MetadataAccessor |
| Helper class for inter library access. More... | |
Public Member Functions | |
| object | GetValueByKey (MetadataKey key) |
| Retrieves the value associated with a strongly typed metadata key. | |
| T | GetValueByKey< T > (MetadataKeyT< T > key) |
| Retrieves the value associated with a strongly typed metadata key. | |
| object | GetValueByName (string name) |
| Retrieves a metadata value by its string key. | |
| bool | TryGetValueByKey (MetadataKey key, out object? value) |
| Attempts to retrieve a value associated with a strongly typed metadata key. | |
| bool | TryGetValueByKey< T > (MetadataKeyT< T > key, out T? value) |
| Attempts to retrieve a value associated with a strongly typed metadata key. | |
| bool | TryGetValueByName (string name, out object? value) |
| Attempts to retrieve a metadata value using a string-based key. | |
| void | RemoveEntryByName (string name) |
| Removes the entry using a string-based name. If the key does not exist, nothing happens. | |
| void | SetValueByKey (MetadataKey key, object value) |
| Stores a value associated with a strongly typed metadata key. | |
| void | SetValueByName (string key, object value) |
| Stores a metadata value using a string-based key. | |
| bool | HasEntryByKey (MetadataKey key) |
| Determines whether a value exists for the specified strongly typed key. | |
| bool | HasEntryByName (string key) |
| Determines whether a value exists for the specified string key. | |
| override string | ToString () |
| Returns a human-readable representation of the metadata contents. | |
| Metadata | Clone () |
| Creates a copy of this Metadata instance. | |
Properties | |
| IReadOnlyCollection< string > | Keys [get] |
| Gets a read-only collection of all metadata key names. | |
Events | |
| EventHandler? | Changed |
| Occurs when a metadata value is modified. | |
Strongly typed container for image acquisition metadata.
This class provides a flexible key-value store for metadata entries. It supports both string-based keys for dynamic runtime usage and strongly typed keys for compile-time safety. Values are stored internally as objects and can be accessed via casting or generic retrieval methods.
|
inline |
Creates a copy of this Metadata instance.
All predefined metadata values (see MetadataKeys) are either value types or immutable reference types, so this is effectively a deep copy for standard usage. Custom entries added via SetValueByName that use mutable reference types will share references with the original instance.
|
inline |
Retrieves the value associated with a strongly typed metadata key.
| key | The strongly typed metadata key. |
| CommonOutOfRangeException | Thrown when no value exists for the specified key. |
|
inline |
Retrieves the value associated with a strongly typed metadata key.
| T | The expected type of the metadata value. |
| key | The strongly typed metadata key. |
| CommonOutOfRangeException | Thrown when no value exists for the specified key. |
| CommonInvalidCastException | Thrown when the stored value cannot be cast to T . |
|
inline |
Retrieves a metadata value by its string key.
| name | The metadata entry name. |
| CommonOutOfRangeException | Thrown when no value exists for the specified key. |
|
inline |
Determines whether a value exists for the specified strongly typed key.
| key | The metadata key to check. |
true if the key exists; otherwise, false.
|
inline |
Determines whether a value exists for the specified string key.
| key | The key name to check. |
true if the key exists; otherwise, false.
|
inline |
Removes the entry using a string-based name. If the key does not exist, nothing happens.
| name | A runtime string identifier. |
|
inline |
Stores a value associated with a strongly typed metadata key.
| key | The predefined metadata key (for example, MetadataKeys.DeviceTimestamp). |
| value | The value to store. |
| CommonInvalidCastException | Thrown when the supplied value does not match the type expected by the key. |
|
inline |
Stores a metadata value using a string-based key.
| key | The string identifier to associate with the value. |
| value | The value to store. |
|
inline |
Returns a human-readable representation of the metadata contents.
|
inline |
Attempts to retrieve a value associated with a strongly typed metadata key.
| key | The strongly typed metadata key. |
| value | When this method returns, contains the retrieved value if successful; otherwise, null. |
true if the value exists; otherwise, false.
|
inline |
Attempts to retrieve a value associated with a strongly typed metadata key.
| T | The expected type of the metadata value. |
| key | The strongly typed metadata key. |
| value | When this method returns, contains the retrieved value cast to T if successful; otherwise, the default value for T . |
true if the value exists and matches the type; otherwise, false.
|
inline |
Attempts to retrieve a metadata value using a string-based key.
| name | The metadata entry name. |
| value | When this method returns, contains the retrieved value if successful; otherwise, null. |
true if the key exists; otherwise, false.
|
get |
Gets a read-only collection of all metadata key names.
| EventHandler? Changed |
Occurs when a metadata value is modified.