-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (38 loc) · 1009 Bytes
/
Program.cs
File metadata and controls
42 lines (38 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using dependency_resolver;
var nodeDeclarations =
"""
Node::First
Node::Second:First
Node::Third:Second
Node::Fourth:Second
Node::Fifth:First,Second,Third
Node::Sixth:Third,Fourth
Node::Seventh:Fifth
Script::First:Pre,FirstPreScript
Script::First:Post,FirstPostScript
Script::Second:Pre,SecondPreScript
Script::Second:Post,SecondPostScript
Script::Third:Pre,ThirdPreScript
Script::Third:Post,ThirdPostScript
Script::Fourth:Post,FourthPostScript
Script::Fifth:Pre,FifthPreScript
Script::Sixth:Post,SixthPostScript
Script::Seventh:Post,SeventhPostScript
""";
var parser = new DTParser();
var lanes = parser.Parse(nodeDeclarations);
for (var index = 0; index < lanes.Count; index++)
{
Console.WriteLine($"Lane {index + 1}");
foreach (var obj in lanes[index])
{
Console.WriteLine($" {obj}");
if (obj is Node node)
{
foreach (var dep in node.Dependencies)
{
Console.WriteLine($" - {dep.Name}");
}
}
}
}