<commit_before>using System;
using FluentAssertions.Equivalency.Tracing;
using FluentAssertions.Execution;

namespace FluentAssertions.Equivalency;

/// <summary>
/// Is responsible for validating the equality of one or more properties of a subject with another object.
/// </summary>
public class EquivalencyValidator : IEquivalencyValidator
{
    private const int MaxDepth = 10;

    public void AssertEquality(Comparands comparands, EquivalencyValidationContext context)
    {
        using var scope = new AssertionScope();

        scope.AssumeSingleCaller();
        scope.AddReportable("configuration", () => context.Options.ToString());
        scope.BecauseOf(context.Reason);

        RecursivelyAssertEquality(comparands, context);

        if (context.TraceWriter is not null)
        {
            scope.AppendTracing(context.TraceWriter.ToString());
        }
    }

    public void RecursivelyAssertEquality(Comparands comparands, IEquivalencyValidationContext context)
    {
        var scope = AssertionScope.Current;

        if (ShouldCompareMembersThisDeep(context.CurrentNode, context.Options, scope))<commit_msg>Update summary of EquivalencyValidator.cs (#1991)<commit_after>using System;
using FluentAssertions.Equivalency.Tracing;
using FluentAssertions.Execution;

namespace FluentAssertions.Equivalency;

/// <summary>
/// Is responsible for validating the equivalency of a subject with another object.
/// </summary>
public class EquivalencyValidator : IEquivalencyValidator
{
    private const int MaxDepth = 10;

    public void AssertEquality(Comparands comparands, EquivalencyValidationContext context)
    {
        using var scope = new AssertionScope();

        scope.AssumeSingleCaller();
        scope.AddReportable("configuration", () => context.Options.ToString());
        scope.BecauseOf(context.Reason);

        RecursivelyAssertEquality(comparands, context);

        if (context.TraceWriter is not null)
        {
            scope.AppendTracing(context.TraceWriter.ToString());
        }
    }

    public void RecursivelyAssertEquality(Comparands comparands, IEquivalencyValidationContext context)
    {
        var scope = AssertionScope.Current;

        if (ShouldCompareMembersThisDeep(context.CurrentNode, context.Options, scope))
{'fraction_non_alphanumeric': 0.08497590889180902, 'fraction_numerical': 0.003504161191414805, 'mean_word_length': 3.788259958071279, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '7388219', 'n_tokens_mistral': 598, 'n_tokens_neox': 576, 'n_words': 142}