Git Product home page Git Product logo

Comments (5)

thomasgalliker avatar thomasgalliker commented on June 15, 2024

Thanks for reporting this issue. I'm looking at it right now. I will post a pre-release nuget package as soon as the fix is ready.

from objectdumper.

thomasgalliker avatar thomasgalliker commented on June 15, 2024

The nuget pre-release that contains the bug fix for this issue is available here:
https://www.nuget.org/packages/ObjectDumper.NET/4.1.1-pre

Can you @ibs-ts verify if the problem is solved and give feedback, please? I'll release a stable nuget version afterwards.

from objectdumper.

ibs-ts avatar ibs-ts commented on June 15, 2024

I've tested 4.1.1-pre with our rather complex model and at least the integration tests succeed.
Thank you for the fix.
Of course it requires more testing and benchmarking after the stable version is released to find any issues.

from objectdumper.

ibs-ts avatar ibs-ts commented on June 15, 2024

Side note:

After writing the above comment, I had the idea to add a delegate property to the SampleData-class.
This results in a 'wall-of-text'-output. It's not part of this issue, but I add this so you are aware:

var definition = new SampleData() { Name = "Test", Func = (param) => param };

var str = ObjectDumper.Dump(definition, new DumpOptions()
{
    IndentChar = '\t',
    IndentSize = 1,
    LineBreakChar = Environment.NewLine,
    DumpStyle = DumpStyle.CSharp
});

Console.WriteLine(str);

public readonly record struct SampleData
{
    public required string Name { get; init; }
    public Func<object, object> Func { get; init; }
}

Delegate/lambda/expression output might open pandoras box. I've tried this in the past with visitors. But as soon as you inject parameters (external or referenced) it causes headaches.

from objectdumper.

thomasgalliker avatar thomasgalliker commented on June 15, 2024

Okay. Thanks for testing. Let's look at the other problem in a separate issue.
Func<> are always a bit difficult to handle. I can try it with the given code. Do you want to create a new issue?

from objectdumper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.