<commit_before>﻿namespace ElectronicCash
{
    public struct ActorName
    {
        private readonly string _firstName;
        private readonly string _middleName;
        private readonly string _lastName;
        private readonly string _title;
        private readonly string _entityName;

        public ActorName(string firstName, string middleName, string lastName, string title)
        {
            _firstName = firstName;
            _middleName = middleName;
            _lastName = lastName;
            _title = title;
            _entityName = null;
        }

        public ActorName(string entityName)
        {
            _firstName = null;
            _middleName = null;
            _lastName = null;
            _title = null;
            _entityName = entityName;
        }

        public string FirstName => _firstName;
        public string MiddleName => _middleName;
        public string LastName => _lastName;
        public string Title => _title;
        public string EntityName => _entityName;
    }
}<commit_msg>Validate data in the ctors<commit_after>﻿using System;

namespace ElectronicCash
{
    public struct ActorName
    {
        private readonly string _firstName;
        private readonly string _middleName;
        private readonly string _lastName;
        private readonly string _title;
        private readonly string _entityName;

        public ActorName(string firstName, string middleName, string lastName, string title)
        {
            if (string.IsNullOrEmpty(firstName))
            {
                throw new ArgumentException("First name must not be empty");
            }
            if (string.IsNullOrEmpty(middleName))
            {
                throw new ArgumentException("Middle name must not be empty");
            }
            if (string.IsNullOrEmpty(lastName))
            {
                throw new ArgumentException("Last name must not be empty");
            }

            _firstName = firstName;
            _middleName = middleName;
            _lastName = lastName;
            _title = title;
            _entityName = null;
        }

        public ActorName(string entityName)
        {
            if (string.IsNullOrEmpty(entityName))
            {
                throw new ArgumentException("Entity name must be provided");
            }

            _firstName = null;
            _middleName = null;
            _lastName = null;
            _title = null;
            _entityName = entityName;
        }

        public string FirstName => _firstName;
        public string MiddleName => _middleName;
        public string LastName => _lastName;
        public string Title => _title;
        public string EntityName => _entityName;
    }
}
{'fraction_non_alphanumeric': 0.06088224571636894, 'fraction_numerical': 0.0, 'mean_word_length': 1.7633434038267874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3486372', 'n_tokens_mistral': 666, 'n_tokens_neox': 647, 'n_words': 199}