Giter Site home page Giter Site logo

Comments (8)

jbienz avatar jbienz commented on May 9, 2024 1

Ah, sorry @xoofx I didn't realize the status of the project had changed. I have submitted this fix as PR #114.

Based on the status of the project (which is understandable), I'm just curious how often you might be publishing NuGet updates?

Thank you!

from sharpyaml.

bolducke avatar bolducke commented on May 9, 2024

I'm still having this issue! Is there any improvement?

from sharpyaml.

2bam avatar 2bam commented on May 9, 2024

I have the same issue (.NET 4.7.1 VS2017 v15.9.26), it happens because Order can't be a custom attribute parameter because it's nullable int? and by definition can't be a constant literal which is the only type attribute parameters can take.

Found the explanation here:
https://stackoverflow.com/questions/1416126/why-is-a-nullablet-not-a-valid-custom-attribute-parameter-when-t-is

If either Name had a setter or Order was a normal int it could be worked around.

from sharpyaml.

jbienz avatar jbienz commented on May 9, 2024

@xoofx could you please add a constructor overload that takes both name and order? As others have pointed out, int? is not a valid attribute parameter type which results in a CS0655 compiler error.

My application is editing configuration files for an EdgeTX radio. I want to load properties by name in case they're out of order, but when I write them back out I'd like to write them in the same sequence that the radio would.

from sharpyaml.

jbienz avatar jbienz commented on May 9, 2024

Alternatively, I see this comment on the Order property:

Gets or sets the order. Default is -1 (default to alphabetical)

If the order does indeed default to -1, this property could be changed from int? to int and that would resolve the CS0655 error.

from sharpyaml.

xoofx avatar xoofx commented on May 9, 2024

PR welcome

from sharpyaml.

jbienz avatar jbienz commented on May 9, 2024

Actually, it appears that comment is incorrect. It doesn't default to -1 and there is code that explicitly checks for its nullness (HasValue).

I can submit a pull request.

from sharpyaml.

xoofx avatar xoofx commented on May 9, 2024

I have updated the main readme as the status of this project was not clear.

NOTICE:

This project is no longer actively maintained since 2016, but it's still accepting Pull-Requests.

Small improvements and fixes are welcome, but big refactoring won't likely be.

Please, open an issue in case you are not sure about the changes you want to bring before working on a PR.

from sharpyaml.

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.