<commit_before>namespace FacebookSharp
{
    using System;
    using System.Collections.Generic;
    using System.Reflection;
    using Newtonsoft.Json;
    using Schemas.Graph;
    using System.Text;

    public static partial class FacebookUtils
    {

        /// <summary>
        /// Will get the string value for a given enums value, this will
        /// only work if you assign the StringValue attribute to
        /// the items in your enum.
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string GetStringValue(this Enum value)
        {
            // Get the type
            Type type = value.GetType();

            // Get fieldinfo for this type
            FieldInfo fieldInfo = type.GetField(value.ToString());

            // Get the stringvalue attributes
            StringValueAttribute[] attribs = fieldInfo.GetCustomAttributes(
                typeof(StringValueAttribute), false) as StringValueAttribute[];

            // Return the first if there was a match.
            return attribs.Length > 0 ? attribs[0].StringValue : null;
        }

        /// <summary>
        /// Convert <see cref="PictureSizeType"/> to facebook string.
        /// </summary>
        /// <param name="pictureSizeType">
        /// The picture size type.
        /// </param>
        /// <returns>
        /// </returns>
        /// <exception cref="ArgumentOutOfRangeException">
        /// </exception>
        public static string ToString(PictureSizeType pictureSizeType)
        {
            switch (pictureSizeType)
            {
                case PictureSizeType.Square:
                    return "square";
                case PictureSizeType.Small:
                    return "small";
                case PictureSizeType.Large:
                    return "large";
                default:
                    throw new ArgumentOutOfRangeException("pictureSizeType");
            }
        }

        /// <summary>
        /// Converts array of strings to comma seperated values
        /// </summary>
        /// <param name="str">
        /// List of strings
        /// </param>
        /// <returns>
        /// </returns>
        public static string ToCommaSeperatedValues(string[] str)<commit_msg>+ RsvpStatus to string in FacebookUtils<commit_after>namespace FacebookSharp
{
    using System;
    using System.Collections.Generic;
    using System.Reflection;
    using Newtonsoft.Json;
    using Schemas.Graph;
    using System.Text;
    using FacebookSharp.Schemas;

    public static partial class FacebookUtils
    {

        /// <summary>
        /// Will get the string value for a given enums value, this will
        /// only work if you assign the StringValue attribute to
        /// the items in your enum.
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string GetStringValue(this Enum value)
        {
            // Get the type
            Type type = value.GetType();

            // Get fieldinfo for this type
            FieldInfo fieldInfo = type.GetField(value.ToString());

            // Get the stringvalue attributes
            StringValueAttribute[] attribs = fieldInfo.GetCustomAttributes(
                typeof(StringValueAttribute), false) as StringValueAttribute[];

            // Return the first if there was a match.
            return attribs.Length > 0 ? attribs[0].StringValue : null;
        }

        /// <summary>
        /// Convert <see cref="PictureSizeType"/> to facebook string.
        /// </summary>
        /// <param name="pictureSizeType">
        /// The picture size type.
        /// </param>
        /// <returns>
        /// </returns>
        /// <exception cref="ArgumentOutOfRangeException">
        /// </exception>
        public static string ToString(PictureSizeType pictureSizeType)
        {
            switch (pictureSizeType)
            {
                case PictureSizeType.Square:
                    return "square";
                case PictureSizeType.Small:
                    return "small";
                case PictureSizeType.Large:
                    return "large";
                default:
                    throw new ArgumentOutOfRangeException("pictureSizeType");
            }
        }

        public static string ToString(RsvpStatus rsvpStatus)
        {
            switch (rsvpStatus)
            {
                case RsvpStatus.Attending:
                    return "attending";
                case RsvpStatus.Unsure:
                    return "unsure";
                case RsvpStatus.Declined:
                    return "declined";
                case RsvpStatus.NotReplied:
                    return "not_replied";
                default:
                    throw new ArgumentOutOfRangeException("rsvpStatus");
            }
        }

        /// <summary>
        /// Converts array of strings to comma seperated values
        /// </summary>
        /// <param name="str">
        /// List of strings
        /// </param>
        /// <returns>
        /// </returns>
        public static string ToCommaSeperatedValues(string[] str)
{'fraction_non_alphanumeric': 0.10030686612965094, 'fraction_numerical': 0.0007671653241273494, 'mean_word_length': 1.491638795986622, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2648205', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1215, 'n_words': 353}