Skip to content

Local Properties are incorrectly reported as roots #59

Description

@JakeGinnivan
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions