<commit_before>﻿namespace Handyman.AspNetCore
{
    public static class ETagComparer
    {
        public static bool Equals(string eTag1, string eTag2)
        {
            if (eTag1 == "*" || eTag2 == "*")
                return true;

            if (string.IsNullOrWhiteSpace(eTag1) || string.IsNullOrWhiteSpace(eTag2))
                return false;

            return eTag1 == eTag2;
        }

        public static bool EqualsSqlServerRowVersion(string eTag, byte[] rowVersion)
        {
            if (eTag == "*")
                return true;

            if (string.IsNullOrWhiteSpace(eTag))
                return false;

            return eTag == ETagConverter.FromSqlServerRowVersion(rowVersion);
        }
    }
}<commit_msg>ETagComparer no longer static to allow for customizations<commit_after>﻿namespace Handyman.AspNetCore
{
    public class ETagComparer
    {
        public static readonly ETagComparer Instance = new ETagComparer();

        private ETagComparer() { }

        public bool Equals(string eTag1, string eTag2)
        {
            if (eTag1 == "*" || eTag2 == "*")
                return true;

            if (string.IsNullOrWhiteSpace(eTag1) || string.IsNullOrWhiteSpace(eTag2))
                return false;

            return eTag1 == eTag2;
        }

        public bool EqualsSqlServerRowVersion(string eTag, byte[] rowVersion)
        {
            if (eTag == "*")
                return true;

            if (string.IsNullOrWhiteSpace(eTag))
                return false;

            return eTag == ETagConverter.FromSqlServerRowVersion(rowVersion);
        }
    }
}
{'fraction_non_alphanumeric': 0.09130166563849476, 'fraction_numerical': 0.00987045033929673, 'mean_word_length': 1.850615114235501, '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': '7659394', 'n_tokens_mistral': 458, 'n_tokens_neox': 447, 'n_words': 101}