<commit_before>﻿using Mailgun.Core.Messages;

namespace Mailgun.Messages
{
    /// <summary>
    /// A structure that represents an email recipient with a DisplayName and an e-mail address
    /// </summary>
    public struct Recipient : IRecipient
    {
        /// <summary>
        /// The display name for the recipient
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// The email address for the recipient
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// Get this recipients value as a formatted string. For example, if a display name is provided, it will return 'displayName <address>'
        /// but if no display name is provided, it will return 'address'
        /// </summary>
        /// <returns></returns>
        public string ToFormattedString()
        {
            return string.IsNullOrEmpty(DisplayName)
                ? Email
                : string.Format("{0} <{1}>", DisplayName, Email);
            ;
        }
    }
}<commit_msg>Add quotes to recepient display name (#7)<commit_after>﻿using Mailgun.Core.Messages;

namespace Mailgun.Messages
{
    /// <summary>
    /// A structure that represents an email recipient with a DisplayName and an e-mail address
    /// </summary>
    public struct Recipient : IRecipient
    {
        /// <summary>
        /// The display name for the recipient
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// The email address for the recipient
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// Get this recipients value as a formatted string. For example, if a display name is provided, it will return 'displayName <address>'
        /// but if no display name is provided, it will return 'address'
        /// </summary>
        /// <returns></returns>
        public string ToFormattedString()
        {
            return string.IsNullOrEmpty(DisplayName)
                ? Email
                : string.Format("\"{0}\" <{1}>", DisplayName, Email);
            ;
        }
    }
}
{'fraction_non_alphanumeric': 0.11712962962962963, 'fraction_numerical': 0.0023148148148148147, 'mean_word_length': 1.759897828863346, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, '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': '1657562', 'n_tokens_mistral': 556, 'n_tokens_neox': 540, 'n_words': 196}