Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Properties are incorrectly reported as roots #59

Open
JakeGinnivan opened this issue Nov 13, 2014 · 0 comments
Open

Local Properties are incorrectly reported as roots #59

JakeGinnivan opened this issue Nov 13, 2014 · 0 comments
Labels

Comments

@JakeGinnivan
Copy link
Contributor

void Main()
{
        var engine = new DependencyEngine();
        engine.Assign(() => C).From(() => A + B, e => { });
        engine.Assign(() => D).From(() => A + C, e => { });

        engine.ToDotFormat(options: new VisualisationOptions { ShowRoot = false }).Dump();
}

public int A { get; set; }
public int B { get; set; }
public int C { get; set; }
public int D { get; set; }

Results in:

digraph  {
     __1 [label="(A + B)", fillcolor="lightblue", style="filled", shape="octagon"];
     __5 [label="(A + C)", fillcolor="lightblue", style="filled", shape="octagon"];

}

Expected:

digraph  {
     __1 [label="(A + B)", fillcolor="lightblue", style="filled", shape="octagon"];
     __2 [label="C", shape="box", style="filled,rounded"];
     __5 [label="(A + C)", fillcolor="lightblue", style="filled", shape="octagon"];
     __3 [label="A", shape="box", style="filled,rounded"];
     __4 [label="B", shape="box", style="filled,rounded"];
     __6 [label="D", shape="box", style="filled,rounded"];

    __1 -> __2;
    __2 -> __5;
    __5 -> __6;
    __3 -> __1;
    __3 -> __5;
    __4 -> __1;
}

Can get this result by setting ShowRoot to true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant