Carubbi.DiffAnalyzer 2.0.0

Analisador de diferenças entre objetos

Install-Package Carubbi.DiffAnalyzer -Version 2.0.0
dotnet add package Carubbi.DiffAnalyzer --version 2.0.0
<PackageReference Include="Carubbi.DiffAnalyzer" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Carubbi.DiffAnalyzer --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Carubbi.DiffAnalyzer

Difference Analyzer between two instances

It's a component able to compare two instances of the same type and by reflection show the differences. Has a Asp.net webforms colorful panel to show these differences and highly configurable. You can set the depth of the object or to return specifc status of comparison like added, deleted, modified or unmodified.

Example:

With this two instances:

  var before = new Usuario
            {
                Id = 1,
                Nome = "Michael",
                Apelidos = new List<string>
                {
                    "Mike",
                    "MK"
                },
                Enderecos = new List<Endereco>
                {
                    new Endereco()
                    {
                        Logradouro = "1st street",
                        UF = new UF()
                        {
                            Nome = "SP",
                            Cidades = new[]
                            {
                                new Cidade
                                {
                                    Nome = "Sao Paulo"
                                },
                                new Cidade
                                {
                                    Nome =  "Santos"
                                }
                            },
                        },
                    },
                },
                Telefones =  new List<Telefone>
                {
                    new Telefone()
                    {
                        DDD = "11",
                        Numero = "91234-5678",
                        Tipo = TipoTelefone.Celular
                    }
                }
      
            };

            var after = new Usuario
            {
                Id = 1,
                Nome = "Michael",
                Apelidos = new List<string>
                {
                    "None",
                },
                Telefones = new List<Telefone>
                {
                    new Telefone()
                    {
                        DDD = "11",
                        Numero = "1234-5678",
                        Tipo = TipoTelefone.Comercial
                    }
                }

            };

Just call:

    var analyzer = new DiffAnalyzer();
    var results = analyzer.Compare(before, after);

Carubbi.DiffAnalyzer

Difference Analyzer between two instances

It's a component able to compare two instances of the same type and by reflection show the differences. Has a Asp.net webforms colorful panel to show these differences and highly configurable. You can set the depth of the object or to return specifc status of comparison like added, deleted, modified or unmodified.

Example:

With this two instances:

  var before = new Usuario
            {
                Id = 1,
                Nome = "Michael",
                Apelidos = new List<string>
                {
                    "Mike",
                    "MK"
                },
                Enderecos = new List<Endereco>
                {
                    new Endereco()
                    {
                        Logradouro = "1st street",
                        UF = new UF()
                        {
                            Nome = "SP",
                            Cidades = new[]
                            {
                                new Cidade
                                {
                                    Nome = "Sao Paulo"
                                },
                                new Cidade
                                {
                                    Nome =  "Santos"
                                }
                            },
                        },
                    },
                },
                Telefones =  new List<Telefone>
                {
                    new Telefone()
                    {
                        DDD = "11",
                        Numero = "91234-5678",
                        Tipo = TipoTelefone.Celular
                    }
                }
      
            };

            var after = new Usuario
            {
                Id = 1,
                Nome = "Michael",
                Apelidos = new List<string>
                {
                    "None",
                },
                Telefones = new List<Telefone>
                {
                    new Telefone()
                    {
                        DDD = "11",
                        Numero = "1234-5678",
                        Tipo = TipoTelefone.Comercial
                    }
                }

            };

Just call:

    var analyzer = new DiffAnalyzer();
    var results = analyzer.Compare(before, after);

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 183 9/11/2018
1.0.0 184 8/21/2018