A small immutable value type representing a KeyValues3 identifier with a name and a GUID. It stores Name and Id and formats them as "Name:version{Guid}" in ToString().
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using HumanoidRetargeter.EditorTools.Embedded.ValveResourceFormat.Utils;
namespace HumanoidRetargeter.EditorTools.Embedded.ValveResourceFormat.Serialization.KeyValues;
/// <summary>
/// Represents a <see cref="KeyValues3"/> identifier with a name and GUID.
/// </summary>
public readonly record struct KV3ID(string Name, Guid Id)
{
/// <inheritdoc/>
/// <remarks>
/// Returns the <see cref="KV3ID"/> in the format "Name:version{Guid}".
/// </remarks>
public override string ToString()
{
return $"{Name}:version{{{Id}}}";
}
}