/// <summary>Creates a 96-bit <see cref="VersionStamp"/>.</summary> /// <returns>Complete stamp, with a user version.</returns> public static VersionStamp Custom(Uuid80 uuid, ushort userVersion, bool incomplete) { unsafe { byte *ptr = stackalloc byte[10]; uuid.WriteToUnsafe(ptr); ulong version = UnsafeHelpers.LoadUInt64BE(ptr); ushort order = UnsafeHelpers.LoadUInt16BE(ptr + 8); return(new VersionStamp(version, order, userVersion, incomplete ? (ushort)(FLAGS_IS_INCOMPLETE | FLAGS_HAS_VERSION) : FLAGS_HAS_VERSION)); } }
/// <summary>Creates a 96-bit <see cref="VersionStamp"/>.</summary> /// <returns>Complete stamp, with a user version.</returns> public static VersionStamp Custom(Uuid80 uuid, bool incomplete) { unsafe { byte *ptr = stackalloc byte[10]; uuid.WriteToUnsafe(ptr); ulong version = UnsafeHelpers.LoadUInt64BE(ptr); ushort order = UnsafeHelpers.LoadUInt16BE(ptr + 8); return(new VersionStamp(version, order, NO_USER_VERSION, incomplete ? FLAGS_IS_INCOMPLETE : FLAGS_NONE)); } }