Comments (8)
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.
I'm still having this issue! Is there any improvement?
from sharpyaml.
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.
@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.
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.
PR welcome
from sharpyaml.
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.
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)
- The string "null" should be deserialized as a string, not as null
- Question: Plans to support NRT? HOT 2
- Custom naming convention attribute
- Reusing Serializer instance errors HOT 5
- Unable to find package SharpYaml with version (>= 2.1.0)
- [Question] Is there a way to make nested data block style and rest flow style using the serializer?
- Serialization of private properties HOT 2
- Usage samples are lacking information HOT 1
- Custom converter for generic types
- Support for System Immutable collection types HOT 1
- When is the support dimension [2]?
- Preserving comments HOT 2
- Exception was of type 'FileNotFoundException' HOT 1
- Ignore unmapped properties in YAML HOT 4
- No longer can set Alias for property like this: [YamlMember(Alias = "$ref")] HOT 1
- SemanticErrorException when path key exceeds 1023 characters HOT 3
- Quotation marks are need for string like `"1e3"`, otherwise it will be regard as number `1000` HOT 2
- Anchor missing for sibling nested objects HOT 2
- Multiline strings are not emitted in the literal/folded style
- License Confusion HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpyaml.