Giter Site home page Giter Site logo

Comments (11)

cezarypiatek avatar cezarypiatek commented on May 22, 2024

Hi @imtrobin,
Can you show YYY and XXX classes' definitions?

from mappinggenerator.

imtrobin avatar imtrobin commented on May 22, 2024
public class XXX
 {
        public string Name             = null;
        public string Description      = null;
        public HashSet <string> Hashes            = null;
}

public class YYY
    {
        public string ID    = null;
        public string Name             = null;
        public string Description      = null;

        public HashSet <string> Hashes            = null;
         public DateTime TimeCreated      = DateTime.MinValue;
}

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on May 22, 2024

Currently, MappingGenerator is using properties to determine the source and destination of mapping. Is there any particular reason why you prefer fields over properties?

from mappinggenerator.

imtrobin avatar imtrobin commented on May 22, 2024

I see. I do not need c# properties get/set so I chose with simple fields since it is always public get/set

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on May 22, 2024

Since C# 3.0, when auto-implemented properties had been introduced, they should be a default choice.
I can't see any specific reason why this language relict should be supported - of course, PR with the implementation of this functionality is welcome.

from mappinggenerator.

imtrobin avatar imtrobin commented on May 22, 2024

These are just simple classes to map rest requests. I do use properties in other places, where needed. Will add it to my todo list. I presume you are using reflection so it should fairly easy to get member vars.

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on May 22, 2024

MappingGenerator is not using reflection. It's completely based on the Roslyn and SyntaxTree analysis.

from mappinggenerator.

imtrobin avatar imtrobin commented on May 22, 2024

Oh bummer, not familiar with that.

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on May 22, 2024

I'm working on it but I can't promise when this will be released (I need to refactor a couple of things before to keep the codebase still maintainable).

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on May 22, 2024

A new version 1.16.393 with this feature has been released. @imtrobin could you test it and let me know if this works as expected?

from mappinggenerator.

imtrobin avatar imtrobin commented on May 22, 2024

Hi cezary, seems to be working well, thanks!

from mappinggenerator.

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.