<commit_before>using System;

namespace Codestellation.DarkFlow.Database
{
    public struct Identifier
    {
        private readonly Guid _id;

        private readonly Region _region;
        
        private readonly string _asString;

        public Identifier(Guid id, Region region)
        {
            if (Guid.Empty.Equals(id))
            {
                throw new ArgumentException("Id should be not empty Guid.", "id");
            }

            if(string.IsNullOrWhiteSpace(region.Name))
            {
                throw new ArgumentException("Region should be initialized with not null not empty value", "region");
            }

            _id = id;
            _region = region;
            _asString = string.Format("{0}.{1}", _region, _id);
        }

        public Guid Id
        {
            get { return _id; }
        }

        public Region Region
        {
            get { return _region; }
        }

        public bool IsValid
        {
            get { return !Guid.Empty.Equals(_id) && _region.IsValid; }
        }

        public override string ToString()
        {
            return _asString;
        }

        public bool Equals(Identifier other)
        {
            return _id.Equals(other._id) && _region.Equals(other._region);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            return obj is Identifier && Equals((Identifier) obj);
        }

        public override int GetHashCode()<commit_msg>Removed early string generation in identifier<commit_after>using System;

namespace Codestellation.DarkFlow.Database
{
    public struct Identifier
    {
        private readonly Guid _id;

        private readonly Region _region;
        
        public Identifier(Guid id, Region region)
        {
            if (Guid.Empty.Equals(id))
            {
                throw new ArgumentException("Id should be not empty Guid.", "id");
            }

            if(string.IsNullOrWhiteSpace(region.Name))
            {
                throw new ArgumentException("Region should be initialized with not null not empty value", "region");
            }

            _id = id;
            _region = region;
        }

        public Guid Id
        {
            get { return _id; }
        }

        public Region Region
        {
            get { return _region; }
        }

        public bool IsValid
        {
            get { return !Guid.Empty.Equals(_id) && _region.IsValid; }
        }

        public override string ToString()
        {
            return  string.Concat(_region.Name, ".", _id.ToString());
        }

        public bool Equals(Identifier other)
        {
            return _id.Equals(other._id) && _region.Equals(other._region);
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            return obj is Identifier && Equals((Identifier) obj);
        }

        public override int GetHashCode()
{'fraction_non_alphanumeric': 0.08371634931057124, 'fraction_numerical': 0.0006565988181221273, 'mean_word_length': 1.5412844036697249, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4715228', 'n_tokens_mistral': 782, 'n_tokens_neox': 748, 'n_words': 215}