<commit_before>using System;
using Coolector.Common.Domain;
using Coolector.Common.Extensions;

namespace Coolector.Services.Remarks.Domain
{
    public class RemarkState : ValueObject<RemarkState>
    {
        public string State { get; protected set; }
        public RemarkUser User { get; protected set; }
        public string Description { get; protected set; }
        public Location Location { get; protected set; }
        public DateTime CreatedAt { get; protected set; }

        public static class Names
        {
            public static string New => "new";
            public static string Processing => "processing";
            public static string Resolved => "resolved";
            public static string Renewed => "renewed";
            public static string Canceled => "canceled";
        }

        protected RemarkState()
        {
        }

        protected RemarkState(string state, RemarkUser user, string description = null, Location location = null)
        {
            if (state.Empty())
            {
                throw new ArgumentException("State can not be empty.", nameof(state));
            }
            if (user == null)
            {
                throw new ArgumentException("User can not be null.", nameof(user));
            }
            if (description?.Length > 2000)
            {
                throw new ArgumentException("Description can not have more than 2000 characters.", 
                                            nameof(description));
            }

            State = state;
            User = user;
            Description = description?.Trim() ?? string.Empty;
            CreatedAt = DateTime.UtcNow;
        }

        public static RemarkState New(RemarkUser user, Location location, string description = null) 
            => new RemarkState(Names.New, user, description, location);

        public static RemarkState Processing(RemarkUser user, string description = null) 
            => new RemarkState(Names.Processing, user, description);

        public static RemarkState Resolved(RemarkUser user, Location location, string description = null) 
            => new RemarkState(Names.Resolved, user, description, location);

        public static RemarkState Renewed(RemarkUser user, string description = null) 
            => new RemarkState(Names.Renewed, user, description);

        public static RemarkState Canceled(RemarkUser user, string description = null) 
            => new RemarkState(Names.Canceled, user, description);

        protected override bool EqualsCore(RemarkState other) 
            => State.Equals(other.State) 
                && User.Equals(other.User) 
                && CreatedAt.Equals(other.CreatedAt)
                && Description == other.Description;

        protected override int GetHashCodeCore() 
            => State.GetHashCode() ^ User.GetHashCode() 
                ^ CreatedAt.GetHashCode() ^ Description.GetHashCode();
    }
}<commit_msg>Fixed storing state location<commit_after>using System;
using Coolector.Common.Domain;
using Coolector.Common.Extensions;

namespace Coolector.Services.Remarks.Domain
{
    public class RemarkState : ValueObject<RemarkState>
    {
        public string State { get; protected set; }
        public RemarkUser User { get; protected set; }
        public string Description { get; protected set; }
        public Location Location { get; protected set; }
        public DateTime CreatedAt { get; protected set; }

        public static class Names
        {
            public static string New => "new";
            public static string Processing => "processing";
            public static string Resolved => "resolved";
            public static string Renewed => "renewed";
            public static string Canceled => "canceled";
        }

        protected RemarkState()
        {
        }

        protected RemarkState(string state, RemarkUser user, string description = null, Location location = null)
        {
            if (state.Empty())
            {
                throw new ArgumentException("State can not be empty.", nameof(state));
            }
            if (user == null)
            {
                throw new ArgumentException("User can not be null.", nameof(user));
            }
            if (description?.Length > 2000)
            {
                throw new ArgumentException("Description can not have more than 2000 characters.", 
                                            nameof(description));
            }

            State = state;
            User = user;
            Description = description?.Trim() ?? string.Empty;
            Location = location;
            CreatedAt = DateTime.UtcNow;
        }

        public static RemarkState New(RemarkUser user, Location location, string description = null) 
            => new RemarkState(Names.New, user, description, location);

        public static RemarkState Processing(RemarkUser user, string description = null) 
            => new RemarkState(Names.Processing, user, description);

        public static RemarkState Resolved(RemarkUser user, Location location, string description = null) 
            => new RemarkState(Names.Resolved, user, description, location);

        public static RemarkState Renewed(RemarkUser user, string description = null) 
            => new RemarkState(Names.Renewed, user, description);

        public static RemarkState Canceled(RemarkUser user, string description = null) 
            => new RemarkState(Names.Canceled, user, description);

        protected override bool EqualsCore(RemarkState other) 
            => State.Equals(other.State) 
                && User.Equals(other.User) 
                && CreatedAt.Equals(other.CreatedAt)
                && Description == other.Description;

        protected override int GetHashCodeCore() 
            => State.GetHashCode() ^ User.GetHashCode() 
                ^ CreatedAt.GetHashCode() ^ Description.GetHashCode();
    }
}
{'fraction_non_alphanumeric': 0.08480801335559265, 'fraction_numerical': 0.002671118530884808, 'mean_word_length': 2.0865533230293662, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5100107', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1340, 'n_words': 429}