Beispiel #1
0
        public override bool EqualByMethod <T, TValue>(T x, T y, IEqualityComparer <TValue> comparer, ReferenceHandling referenceHandling = ReferenceHandling.Structural)
        {
            var builder = FieldsSettings.Build();

            builder.AddComparer(comparer);
            var settings = builder.CreateSettings(referenceHandling);

            return(EqualBy.FieldValues(x, y, settings));
        }
Beispiel #2
0
        public override bool EqualByMethod <T>(T x, T y, ReferenceHandling referenceHandling = ReferenceHandling.Structural, string excludedMembers = null, Type excludedType = null)
        {
            var builder = FieldsSettings.Build();

            if (excludedMembers != null)
            {
                builder.AddIgnoredField <T>(excludedMembers);
            }

            if (excludedType != null)
            {
                builder.AddImmutableType(excludedType);
            }

            var settings = builder.CreateSettings(referenceHandling);

            return(EqualBy.FieldValues(x, y, settings));
        }
Beispiel #3
0
 public override bool EqualByMethod <T>(T x, T y, ReferenceHandling referenceHandling)
 {
     return(EqualBy.FieldValues(x, y, referenceHandling));
 }
 public bool EqualByFieldValues()
 {
     return(EqualBy.FieldValues(this.x, this.y));
 }