public static void CloneOutVertexTree( IVertexListGraph g, ISerializableVertexAndEdgeListGraph sub, IVertex v, int maxDepth ) { if (g == null) { throw new ArgumentNullException("g"); } if (sub == null) { throw new ArgumentNullException("sub"); } if (v == null) { throw new ArgumentNullException("v"); } DepthFirstSearchAlgorithm dfs = new DepthFirstSearchAlgorithm(g); PopulatorVisitor pop = new PopulatorVisitor(sub); dfs.StartVertex += new VertexEventHandler(pop.StartVertex); dfs.TreeEdge += new EdgeEventHandler(pop.TreeEdge); dfs.MaxDepth = maxDepth; dfs.Initialize(); dfs.Visit(v, 0); }
internal void PopulateTables(PhpCompilation compilation, IEnumerable <SourceUnit> /**/ trees) { Contract.ThrowIfNull(compilation); Contract.ThrowIfNull(trees); _baseDirectory = compilation.Options.BaseDirectory; var visitor = new PopulatorVisitor(compilation, this); trees.ForEach(visitor.VisitSourceUnit); }
internal void PopulateTables(PhpCompilation compilation, IEnumerable<SourceUnit>/**/trees) { Contract.ThrowIfNull(compilation); Contract.ThrowIfNull(trees); _baseDirectory = compilation.Options.BaseDirectory; var visitor = new PopulatorVisitor(compilation, this); trees.ForEach(visitor.VisitSourceUnit); }