class GraphBuilder { void BuildGraph() { var behaviorGraph = BehaviorGraph.BuildFrom(builder => { builder.AddNode(); builder.AddNode (); builder.Connect (); }); } }
class Machine { public string Name { get; set; } } class GraphBuilder { void BuildGraph(ListIn this example, a behavior graph is built using a list of machines as input. Each machine is turned into a MachineNode, with the machine's name set as a parameter. The package library for the BehaviorGraph BuildFrom method is likely to be the BehaviorGraph library, which is a C# package that provides developers with a set of tools for building and managing complex behavior graphs.machines) { var behaviorGraph = BehaviorGraph.BuildFrom(builder => { foreach (var machine in machines) { builder.AddNode (x => x.Name = machine.Name); } }); } }