<commit_before>﻿// ReSharper disable All
#pragma warning disable INPC003 // Notify when property changes.
#pragma warning disable INPC001 // Implement INotifyPropertyChanged.
namespace Gu.State.Tests.EqualByTests
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Runtime.CompilerServices;

    public static class EqualByTypes
    {
        public class With<T>
        {
            public With(T value)
            {
                this.Value = value;
            }

            public T Value { get; }
        }

        public class IntCollection : IReadOnlyList<int>
        {
            public static readonly IEqualityComparer<IntCollection> Comparer = new IntsEqualityComparer();
            private readonly IReadOnlyList<int> ints;

            public IntCollection(params int[] ints)
            {
                this.ints = ints;
            }

            public int Count => this.ints.Count;

            public int this[int index] => this.ints[index];

            public IEnumerator<int> GetEnumerator() => this.ints.GetEnumerator();<commit_msg>ToString for With<T><commit_after>﻿// ReSharper disable All
#pragma warning disable INPC003 // Notify when property changes.
#pragma warning disable INPC001 // Implement INotifyPropertyChanged.
namespace Gu.State.Tests.EqualByTests
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Runtime.CompilerServices;

    public static class EqualByTypes
    {
        public class With<T>
        {
            public With(T value)
            {
                this.Value = value;
            }

            public T Value { get; }

            public override string ToString() => $"With<{typeof(T).PrettyName()}> {{ {this.Value?.ToString() ?? "null"} }}";
        }

        public class IntCollection : IReadOnlyList<int>
        {
            public static readonly IEqualityComparer<IntCollection> Comparer = new IntsEqualityComparer();
            private readonly IReadOnlyList<int> ints;

            public IntCollection(params int[] ints)
            {
                this.ints = ints;
            }

            public int Count => this.ints.Count;

            public int this[int index] => this.ints[index];

            public IEnumerator<int> GetEnumerator() => this.ints.GetEnumerator();
{'fraction_non_alphanumeric': 0.0877970197341925, 'fraction_numerical': 0.004832863471606927, 'mean_word_length': 2.1363636363636362, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 22, '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': '4928321', 'n_tokens_mistral': 661, 'n_tokens_neox': 640, 'n_words': 172}