ContentAddress Structure
Computes deterministic guid from content data, which can also be used to implement equality.
Endianness is taken care of; all data is byte-reversed when run on a big-endian platform.
Namespace: Quine.Schemas.CoreAssembly: Quine.Schemas.Core (in Quine.Schemas.Core.dll) Version: 1.0.0+0ea0706914ee4edf2b0ed66bec3ab4d062a43b68
public struct ContentAddress
- Inheritance
- Object ValueType ContentAddress
The supported types are primitives, string, DateTime, DateTimeOffset,
TimeSpan, Guid, enums (converted to ulong for address computation), byte[],
KeyValuePair{K,V}, IReadOnlyList{V} and types implementing IContentAddressable.
Enumerables cannot be nested, and generic parameters must satisfy the same constraints.
The computation also distinguishes between a null reference and an empty collection.
Dictionaries are not supported because iteration may return elements in non-deterministic order between
runs of the same program.
Add |
Visitor method used by IContentAddressable for adding values to existing computation.
|
Get |
Computes content address (a GUID) from given values. The values, together with the namespace,
are fed to SHA256 and the highest 128 bits are used to form a v5 GUID.
|