internal static string ToDomain(this IEnumerable <EmailAddressModel> emailAddressModelCollection, IConverter microsoftGraphModelConverter)
        {
            NullGuard.NotNull(emailAddressModelCollection, nameof(emailAddressModelCollection))
            .NotNull(microsoftGraphModelConverter, nameof(microsoftGraphModelConverter));

            EmailAddressModel emailAddressModel = emailAddressModelCollection.FirstOrDefault();

            return(emailAddressModel == null ? null : microsoftGraphModelConverter.Convert <EmailAddressModel, string>(emailAddressModel));
        }
        internal static bool IsEmpty(this EmailAddressModel emailAddressModel)
        {
            NullGuard.NotNull(emailAddressModel, nameof(emailAddressModel));

            return(string.IsNullOrWhiteSpace(emailAddressModel.Address) && string.IsNullOrWhiteSpace(emailAddressModel.Name));
        }
        internal static string ToDomain(this EmailAddressModel emailAddressModel)
        {
            NullGuard.NotNull(emailAddressModel, nameof(emailAddressModel));

            return(string.IsNullOrWhiteSpace(emailAddressModel.Address) ? null : emailAddressModel.Address);
        }