1

Closed

Doubt: When Ignoring Types....

description

Hi!,
I have a doubt about the "CompareLogic" when we set "IgnoreObjectTypes" to true, it´s possible to define to ignore name menbers too? Because when I do it like this.
            var comparador = new CompareLogic();
            comparador.Config.MembersToIgnore.Add("Capacity");
            comparador.Config.IgnoreObjectTypes = true;
            var resultado = comparador.Compare(dto, obj);
            Assert.IsTrue(resultado.AreEqual, resultado.DifferencesString);
I Receive an error of different types, when I call ".Compare"

file attachments

comments

gfinzer wrote Dec 16, 2015 at 1:24 AM

Can you please attach the two classes that you are comparing?

wrote Dec 16, 2015 at 10:26 AM

onlyice wrote Dec 16, 2015 at 10:27 AM

hi!
I create a sample project, here is...

gfinzer wrote Dec 16, 2015 at 12:52 PM

Thanks for the project. I see the problem. It looks like it is not ignoring the type for the child property Formulario. I will put this on the list of items to fix.

Thanks,
Greg

onlyice wrote Dec 16, 2015 at 4:32 PM

Thank you very much!

wrote Mar 5, 2016 at 1:19 AM