GithubHelp home page GithubHelp logo

merijndejonge / dgmlbuilder Goto Github PK

View Code? Open in Web Editor NEW
59.0 59.0 16.0 268 KB

DgmlBuilder is a small DotNet library for generating DGML graphs without having to know all the details of DGML (the Microsoft Directed Graph Markup Language).

License: Apache License 2.0

C# 100.00%

dgmlbuilder's People

Contributors

cptjazz avatar merijn040 avatar merijndejonge avatar shaggygi avatar thexenocide 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

Watchers

 avatar  avatar  avatar  avatar  avatar

dgmlbuilder's Issues

I can't generate dgml with single file generator (VSIX) because of roslyn Any help?

Hi , I'm trying to build a single file generator ( VSIX ) in C#, the problem is that I can't get a Syntax tree using roslyn . Is there a useful way?!

Note: I tried
SyntaxFactory.ParseSyntaxTree ("code" ) and CSharpSyntaxTree.ParseText ("code")

Both failed ...!

Another note : I'm trying to make the debug work as long as I'm not trying to call functions from Microsoft.CodeAnalysis

Another note: I use microsoft visual studio enterprise 2019 version 16.10.2
And microsoft .NET Framewrok version 4.8.03752

Idea for DgmlBuilder

I naturally model using POCO, so relationships are normally just a collection of some other type, or in the case of a 1:x a simple reference, either way, a Link normally relates two different classes, yet the built in LinkBuilder takes a single type, I therefore find my self doing the following...

            LinkBuilders = new LinkBuilder[]
            {
                new LinkBuilder<Tuple<Project,Project>>(x => new Link
                {
                    Source = x.Item1.Id,
                    Target = x.Item2.Id,
                    Label = "references",
                }),
                new LinkBuilder<Tuple<Module, Module>>(x => new Link
                {
                    Source = x.Item1.Name,
                    Target = x.Item2.Name,
                    Label = "dependsOn",
                }),
                new LinkBuilder<Tuple<Module, Project>>(x => new Link
                {
                    Source = x.Item1.Name,
                    Target = x.Item2.Id,
                    Label = "exports",
                })
            },

I was thinking instead to create a LinkBuilder which takes TWO types, then I can do this...

            LinkBuilders = new LinkBuilder[]
            {
                new LinkBuilder<Project,Project>((s,t) => new Link
                {
                    Source = s.Id,
                    Target = t.Id,
                    Label = "references",
                }),
                new LinkBuilder<Module, Module>((s,t)=> new Link
                {
                    Source = s.Name,
                    Target = t.Name,
                    Label = "dependsOn",
                }),
                new LinkBuilder<Module, Project>((s,t) => new Link
                {
                    Source = s.Name,
                    Target = t.Id,
                    Label = "exports",
                })
            },

If you want me to submit a pull request for this, please ask, the only hack it the base class has to take a single type, to which I provide "typeof(T)"

Nuget package with .NET Standard support?

The current released NuGet package 1.13 is almost a year old and doesn't support .NET Standard. I can see from the current code that this has been resolved and the library now targets NET Standard. Can we get an official updated NuGet package? I have a library that uses this but have to bracket it with conditional compilation for net47, which we aren't even targeting anymore - moved to all up net standard with .NET5 transitioning to core.

Unity Core Module

image
When referencing the project in Program.cs, I'm getting this error.

How to add items from a name space to DMGL programmatically

Hello I appreciate this lib, I would like some help and guidance, where I am trying to import entities from C# source from a models/entity namepace and then add it inside a DbContext definitions (including their entities)

How can I add /import how to import those source/entities to the designer is it done by these methods, I apologize I was reading the help and could not figure it out.

  • by drag and drop
  • or right click import namespace
  • or right click import the models/entities in the solution tree

Can you please tell me which part of the code does it.

HasCategory replaced by GroupLabel

Why are style conditions replaced by HasCategory(GroupLabel), it defeats the purpose of GroupLabel and HasCategory. In my instance the GroupLabel and Category are different, it is also possible to have multiple HasCategory's.

new Condition {Expression = "HasCategory('" + x.GroupLabel + "')"}

I think Conditions shouldn't be overwritten, also a Link can have nested Category nodes.

But other than that it's a great library though!

Move IGraphAnalysis.cs to Analyses folder/namespace

Would it be more appropriate to move this file (IGraphAnalysis.cs) and update namespace where other Analysis files are located?

Currently set to OpenSoftware.DgmlTools.Model instead of OpenSoftware.DgmlTools.Analyses.

This would be a breaking change.

Color - what's that?

I tried to compile lib under .NET FW 4.8, but stuck at place where you use Color class(struct?). From what assembly it is?? No any mention in a project. Just in case, it's in CategoryColorAnalysis.cs

[Feature] Add Support For DirectedGraph root-node XML attributes

I'll be submitting a pull request for this soon, but wanted to create an issue to document the purpose, make it easy to search for, etc.

According to the DGML Markup Reference for the root DirectedGraph node:

The following list describes optional attributes that you can include:

Background - The color of the map background

BackgroundImage - The location of an image file to use as the map background.

GraphDirection - When the map is set to tree layout (Sugiyama), arrange the nodes so that most of the links flow in the specified direction: TopToBottom, BottomToTop, LeftToRight, or RightToLeft. See Change the map layout.

Layout - Set the map to the following layouts: None, Sugiyama (tree layout), ForceDirected (quick clusters), or DependencyMatrix. See Change the map layout.

NeighborhoodDistance - When the map is set to tree layout or quick clusters layout, show only those nodes that are a specified number (1-7) of links away from selected nodes. See Change the map layout.

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.