Giter VIP home page Giter VIP logo

Comments (6)

jods4 avatar jods4 commented on August 23, 2024 1

I made a PR to improve this :)

You have inherited a pretty old codebase... It would benefit from some upgrades but that's a daunting task :/
So many thanks for keeping this alive, because this project is very useful.

from linqtoxsdcore.

mamift avatar mamift commented on August 23, 2024

Seems like a sensible suggestion, and with this reply I note my approval for either yourself or anyone else to begin work on a PR or issue one in the future.

from linqtoxsdcore.

jods4 avatar jods4 commented on August 23, 2024

@mamift That PR had a stupid mistake where the backing field is typed as string, should have been XName of course.
#25 fixes that.

from linqtoxsdcore.

jods4 avatar jods4 commented on August 23, 2024

@mamift I found a bug in this PR today.
When your XSD contains inheritance, the child class need access to the parent XName fields (for its BuildElementDictionary).
So right now the generated code may not compile.
I fixed this by making the XName fields internal instead of private and added EditorBrowsable.Never so that they don't show up as static members for users.
PR coming soon (w/ the nullable refs).

from linqtoxsdcore.

jods4 avatar jods4 commented on August 23, 2024

@mamift Small bit of feedback here.
Using this in our real work, I noticed that EditorBrowsableState.Never is not respected by VS 2019.
I was quite surprised and I learnt that VS doesn't apply this attribute in the same solution.

It kind of makes sense as if you develop a lib you probably want to see all members in IDE (and hide them from consumers of the lib).
That perspective is of course a bit broken when it comes to generated code, which is a bit of a lib in your own code...

So just so you know, this attribute is useless right now but there is a long standing Roslyn issue about it:
dotnet/roslyn#4434 (comment)

from linqtoxsdcore.

jods4 avatar jods4 commented on August 23, 2024

Well, someone pointed this isn't actually the issue here and the behavior was expected.
I opened dotnet/roslyn#51269 to see if that behaviour could be changed.
If not, you can remove the EditorBrowsable from codegen as they're useless.

from linqtoxsdcore.

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.