Пример #1
0
 private void VisitChannelsDepthFromTopRec(Channel channel, int depth, ChannelsDepthVisitor visitor)
 {
     visitor(channel, depth);
     foreach (var child in channel.Connecions)
     {
         VisitChannelsDepthFromTopRec(child, depth + 1, visitor);
     }
 }
Пример #2
0
 public void VisitChannelsDepthFromTop(Channel baseChannel, ChannelsDepthVisitor visitor)
 {
     VisitChannelsDepthFromTopRec(baseChannel, 0, visitor);
 }