GithubHelp home page GithubHelp logo

davidwest / treecollections Goto Github PK

View Code? Open in Web Editor NEW
67.0 9.0 23.0 5.9 MB

A generic tree library in C# that focuses on hierarchical entity representations. It features full LINQ querying, intuitive manipulation of nodes, error detection, class extensibility (e.g. to accommodate business rules), and format conversion / serialization.

License: MIT License

C# 100.00%

treecollections's Introduction

TreeCollections

A generic tree library in C# that focuses on hierarchical entity representations.
Features:

  • Full LINQ querying
  • Intuitive manipulation of nodes
  • Error detection (e.g. cycles)
  • Class extensibility (e.g. to accommodate business rules)
  • Format conversion / serialization.

###Tutorial###

###Get Nuget Package###

treecollections's People

Contributors

davidwest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

treecollections's Issues

Tutorial useless given inability to compile/run code

"Assuming the variable dataRoot holds our CategoryDataNode source root, let's create a core root entity object:"

You never discuss how to create the source root object.'

I was able to install the NuGet package in a new VS 2017 4.72 WinForm project, anf build.

unable to run code in VS 2017

Severity Code Description Project File Line Suppression State
Error CS0115 'AdvancedMutableCategoryNode.Create(DualStateCategoryItem, AdvancedMutableCategoryNode)': no suitable method found to override DemoConsole45 C:\Users\test_user\Desktop\TreeCollections-master\TreeCollections-master\TreeCollections\DemoConsole45\Demos\Classes\ClassesForAdvanced.cs 73 Active

44 errors trying to run the DemoConosole45

Severity Code Description Project File Line Suppression State
Error NETSDK1004 Assets file 'C:\Users\test_user\Desktop\TreeCollections-master\TreeCollections-master\TreeCollections\src\DemoConsole\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. DemoConsole C:\Program Files\dotnet\sdk\2.1.505\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 198

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'DualStateEntityDefinition<,,>' could not be found (are you missing a using directive or an assembly reference?) DemoConsole45 C:\Users\test_user\Desktop\TreeCollections-master\TreeCollections-master\TreeCollections\DemoConsole45\Demos\Classes\ClassesForAdvanced.cs 7 Active

Node-by-Node Tree Building

Since there is no documentation or example/demo code, I'm having a hard time figuring out a particular use case just by looking at class and method names... ๐Ÿ˜ญ I've seen the tutorial, it isn't exactly helping. I think it's for a different use case.

So what I wanted to do is using this library as a plug-and-play visualizer. I've polymorphic hierarchical data (entities) saved in non-hierarchical formats that will be loaded at runtime; I've written models (classes) covering polymorphism that abstractly each should be considered Nodes; and I've got independent pretty print logic that if given the root of the tree will do whatever it does. Now I'm missing the link on how to construct a ReadOnlyEntityTree(Node) or MutableEntityTree(Node) using this library.

I think the easiest way to fill the gap is constructing such a tree node-by-node starting from newing a node as tree root then adding children to it (and its children) as soon as new data comes in. But all these constructors that take either IEnumerable or IEntityDefinition confuses me. It seems I can only construct a tree when I have all the data and have their relationship mapped out?

I'm also not sure how to store different types in the same tree. Adding a common base class to all data models (or use object) will solve this problem but it's kinda a dirty trick. I don't want to use it if there's better solution available. Is the generic type parameter <TItem> strictly enforced on all nodes that can link to this particular node?

Breaking changes / Upgrade document for updating between 1.0.2 -> 1.0.4

It looks like there are breaking changes between 1.0.2 and 1.0.4. The breaking changes seem to be around the removing DualStateEntityDefinition and MutableDualStateEntityTreeNode.

To help people update version is would be good to have a documentation noting breaking changes and alternatives if ones exist.

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.