Coder Social home page Coder Social logo

Comments (6)

EdwardCooke avatar EdwardCooke commented on June 12, 2024

In your top screen shot your casting to a YamlMappingNode before checking the type. In your second screenshot regardless of the type your still casting to YamlMappingNode. My suspicion is both throw an exception.

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 12, 2024

YamlMappingNode would come after the yamlscalar

from yamldotnet.

RadovanPodhradskySk avatar RadovanPodhradskySk commented on June 12, 2024

1st picture was from VS2022 new console application
2nd picture was from VS2022 with opened console application created in VS2019

it was only example method in both solutions

I'm sending you short yaml file example (included in VS2022 solution archive), which has different AllNodes in console application created in VS 2022 and in VS 2019 console application opened in VS2022

I'm sending you archive with simple VS2022 WinForms application example and snippet of yamlNode.AllNodes View (Visualizer View) on Line30 in Form1.cs
AllNodes usually shows whole yaml structure in Visual Studio Visualizer

There is no possibility to traverse from RootNode typed as YamlScalarNode to another node in structure of UnitDescTestShort.yaml file.

YamlLoadExampleVs2022.zip
Vs2022_AllNodes_Visualizer

VS 2022 Professional version installed on my virtual Win10 is 17.6.4

Maybe my description is little bit more clear now.

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 12, 2024

Thanks, the version of Visual Studio shouldn't effect anything, it would be the version of .net that was being targeted by your project. I'll take a look at this tonight and let you know what I see.

from yamldotnet.

EdwardCooke avatar EdwardCooke commented on June 12, 2024

In your zip file, In the ReadFile method you're creating a StringReader instead of a StreamReader.

from yamldotnet.

RadovanPodhradskySk avatar RadovanPodhradskySk commented on June 12, 2024

Really, It was StringReader instead of StreamReader, I don't know how it was written, maybe with IntelliSense. I thought, that I copied these several lines from source file, where StreamWriter is used and behaviour is proper. Thanks for your attention to this my "issue". After using of StreamReader, AllNodes contains all yaml file nodes and RootNode type is YamlMappingNode. You are doing good job to create and support YamlDotNot over YAML standard. I use it in several company projects with very good experience.

from yamldotnet.

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.