public static Saved_MethodStream map_CodeStreams(this Saved_MethodStream savedMethodStream, O2MappedAstData astData, String file, INode iNode) { var o2CodeStream = astData.createO2CodeStream(file, iNode); //var uniqueStreamPaths = o2CodeStream.getUniqueStreamPaths(100); Func <O2CodeStreamNode, CodeStreamPath> map_O2CodeStreamNode = null; map_O2CodeStreamNode = (o2CodeStreamNode) => { var codeStreamPath = new CodeStreamPath(); codeStreamPath.Text = o2CodeStreamNode.Text; codeStreamPath.Line = o2CodeStreamNode.INode.StartLocation.Line; codeStreamPath.Column = o2CodeStreamNode.INode.StartLocation.Column; codeStreamPath.Line_End = o2CodeStreamNode.INode.EndLocation.Line; codeStreamPath.Column_End = o2CodeStreamNode.INode.EndLocation.Column; foreach (var childNode in o2CodeStreamNode.ChildNodes) { codeStreamPath.CodeStreamPaths.add(map_O2CodeStreamNode(childNode)); } return(codeStreamPath); }; foreach (var streamNode in o2CodeStream.StreamNode_First) { savedMethodStream.CodeStreams.add(map_O2CodeStreamNode(streamNode)); } return(savedMethodStream); }