<commit_before>using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace HelloSignNet.Core
{
    public class HSSendSignatureRequestData
    {
        public string Title { get; set; }
        public string Subject { get; set; }
        public string Message { get; set; }
        public string SigningRedirectUrl { get; set; }
        public List<HSSigner> Signers { get; set; }
        public List<string> CcEmailAddresses { get; set; }
        public List<FileInfo> Files { get; set; }
        public List<string> FileUrls { get; set; }
        public int TestMode { get; set; } // true=1, false=0

        public bool IsValid 
        {
            get
            {
                if (Files == null && FileUrls == null)
                    return false;
                if (Files != null && (Files.Count == 0 && FileUrls.Count == 0))
                    return false;
                if ((Files != null && FileUrls != null) && (Files.Count > 0 && FileUrls.Count > 0))
                    return false;
                if (Signers == null || Signers.Count == 0)
                    return false;
                if (Signers.Any(s => string.IsNullOrEmpty(s.Name) || string.IsNullOrEmpty(s.EmailAddress)))
                    return false;

                return true;
            }
        }
    }
}<commit_msg>Fix files validation logic<commit_after>using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace HelloSignNet.Core
{
    public class HSSendSignatureRequestData
    {
        public string Title { get; set; }
        public string Subject { get; set; }
        public string Message { get; set; }
        public string SigningRedirectUrl { get; set; }
        public List<HSSigner> Signers { get; set; }
        public List<string> CcEmailAddresses { get; set; }
        public List<FileInfo> Files { get; set; }
        public List<string> FileUrls { get; set; }
        public int TestMode { get; set; } // true=1, false=0

        public bool IsValid 
        {
            get
            {
                if (Files == null && FileUrls == null)
                {
                    return false;
                }

                if (Files != null && FileUrls == null)
                {
                    if (!Files.Any())
                        return true;
                }

                if (Files == null && FileUrls != null)
                {
                    if (!FileUrls.Any())
                        return false;
                }

                if (Signers == null || Signers.Count == 0)
                    return false;

                if (Signers.Any(s => string.IsNullOrEmpty(s.Name) || string.IsNullOrEmpty(s.EmailAddress)))
                    return false;

                return true;
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10145441645973749, 'fraction_numerical': 0.0035473572188719402, 'mean_word_length': 1.4102564102564104, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '5387622', 'n_tokens_mistral': 773, 'n_tokens_neox': 729, 'n_words': 209}