public readonly record struct ObjectIdA 128-bit content hash: the key of a blob in the object database, and therefore the identity of a *compiled* artefact rather than of a source asset. Two builds that produce the same bytes produce the same ObjectId, which is what makes incremental content builds and delta bundle updates possible.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Deliberately carries no hash function. The algorithm (XxHash128) belongs with the code that has the content in front of it — Vixen.Core.Serialization's object database — and keeping it there is what lets this assembly depend on nothing but the BCL.
Bytes are big-endian, so the 32-digit hex text form reads in the same order as WriteTo writes. Ids from different machines are byte-comparable.
Fields and properties (6)
public const int SizeInBytesSize of the raw id, in bytes.
public const int TextLengthNumber of characters ToString writes.
public ulong HighThe first eight bytes, read big-endian.
public ulong LowThe last eight bytes, read big-endian.
public static ObjectId EmptyThe id of no content.
public bool IsEmptyWhether every bit is zero — the id no real content is expected to have.
Methods (20)
public ObjectId(ulong high, ulong low)Builds an id from its two halves.
public static ObjectId FromBytes(ReadOnlySpan<byte> bytes)Reinterprets 16 raw bytes — typically a hash digest — as an id.
public void WriteTo(Span<byte> destination)Writes the id as 16 big-endian bytes.
public bool TryWriteBytes(Span<byte> destination)Writes the id as 16 big-endian bytes if there is room.
public int CompareTo(ObjectId other)Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public static bool operator <(ObjectId left, ObjectId right)Whether sorts before .
public static bool operator <=(ObjectId left, ObjectId right)Whether sorts before or equal to .
public static bool operator >(ObjectId left, ObjectId right)Whether sorts after .
public static bool operator >=(ObjectId left, ObjectId right)Whether sorts after or equal to .
public override int GetHashCode()The value is already a hash, so folding it again would only cost cycles: this returns bits of it directly.
public override string ToString()Renders the id as 32 lowercase hex digits.
public string ToString(string? format, IFormatProvider? formatProvider)Formats the value of the current instance using the specified format.
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default(ReadOnlySpan<char>), IFormatProvider? provider = null)Tries to format the value of the current instance into the provided span of characters.
public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format = default(ReadOnlySpan<char>), IFormatProvider? provider = null)Tries to format the value of the current instance as UTF-8 into the provided span of bytes.
public static ObjectId Parse(string s, IFormatProvider? provider = null)Parses a string into a value.
public static ObjectId Parse(ReadOnlySpan<char> s, IFormatProvider? provider = null)Parses a span of characters into a value.
public static bool TryParse(string? s, IFormatProvider? provider, out ObjectId result)Tries to parse a string into a value.
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out ObjectId result)Tries to parse a span of characters into a value.
public static bool TryParse(string? s, out ObjectId result)Parses 32 hex digits, in either case.
public static bool TryParse(ReadOnlySpan<char> s, out ObjectId result)
Used by (65, showing 40)
- ContentAddressablesRemote
- ProgramAddressablesRemote
- AssetManagerVixen.Assets
- AssetMaterialSourceTestsVixen.Engine.Renderer.Tests
- AssetTextureSourceTestsVixen.Engine.Renderer.Tests
- BundleCacheVixen.Assets
- BundleFileVixen.Assets
- BundleFormatVixen.Core.Serialization
- BundleOdbBackendVixen.Core.Serialization
- BundleWriterVixen.Core.Serialization
- CatalogBundleVixen.Assets
- CatalogEntryVixen.Assets
- CatalogFormatVixen.Assets
- ChunkFormatVixen.Core.Serialization
- ChunkInfoVixen.Core.Serialization
- ClaimResolverVixen.Assets
- CompositorContentTestsVixen.Assets.Tests
- ContentCatalogVixen.Assets
- ContentCatalogTestsVixen.Assets.Tests
- ContentHashVixen.Core.Serialization
- ContentReferenceVixen.Core.Serialization
- ContentReferenceSerializerVixen.Core.Serialization
- ContentReferenceTestsVixen.Assets.Tests
- ContentUpdateVixen.Assets
- ContentUpdateTestsVixen.Assets.Tests
- DictionaryResolverVixen.Assets.Tests
- FileOdbBackendVixen.Core.Serialization
- IContentResolverVixen.Core.Serialization
- IOdbBackendVixen.Core.Serialization
- IdentityTestsVixen.Core.Tests
- MemoryOdbBackendVixen.Core.Serialization.Tests
- ObjectDatabaseVixen.Core.Serialization
- ObjectDatabaseTestsVixen.Core.Serialization.Tests
- ObjectIdSerializerVixen.Core.Serialization
- RawPayloadVixen.Assets
- ReferenceWorldVixen.Assets.Tests
- RemoteWorldVixen.Assets.Tests
- ResolverVixen.Assets.Tests
- StreamedContentTestsVixen.Assets.Tests
- UpdateWorldVixen.Assets.Tests