using Dna.ControlFlow; using Rivers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Dna.Extensions { public static class ControlFlowExtensions { public static BasicBlock GetBlock(this Node node) { return (BasicBlock)node.UserData.Values.First(); } public static BlockEdge ToBlockEdge(this Edge edge) { var source = (BasicBlock)edge.Source; var target = (BasicBlock)edge.Target; return new BlockEdge(source, target); } } }