<commit_before>﻿// Copyright <NAME> https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.

using System;
using System.Collections.Generic;

namespace ImageMagick
{
    internal static class EnumHelper
    {
        public static string ConvertFlags<TEnum>(TEnum value)
            where TEnum : struct, Enum
        {
            var flags = new List<string>();

            foreach (TEnum enumValue in Enum.GetValues(typeof(TEnum)))
            {
                if (HasFlag(value, enumValue))
                {
                    var name = GetName(enumValue);
                    if (!flags.Contains(name))
                        flags.Add(name);
                }
            }

            return string.Join(",", flags);
        }
<commit_msg>Use ToString instead as suggested in #1122.<commit_after>﻿// Copyright <NAME> https://github.com/dlemstra/Magick.NET.
// Licensed under the Apache License, Version 2.0.

using System;

namespace ImageMagick
{
    internal static class EnumHelper
    {
        public static string ConvertFlags<TEnum>(TEnum value)
            where TEnum : struct, Enum
            => value.ToString();

{'fraction_non_alphanumeric': 0.09965928449744463, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 1.9375, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4214020', 'n_tokens_mistral': 315, 'n_tokens_neox': 303, 'n_words': 86}