private static IReadOnlyList <string> TryReadMetadataIdentifiers(string versionString, ref int index)
        {
            List <string>?result = null;

            while (true)
            {
                if (TryReadMetadataIdentifier(versionString, ref index, out var label))
                {
                    if (result == null)
                    {
                        result = new List <string>();
                    }

                    result.Add(label);
                }

                if (!TryReadDot(versionString, ref index))
                {
                    break;
                }
            }

            return(result == null ? s_emptyArray : ReadOnlyList.From(result));
        }