示例#1
0
 public void Entry(ProtocolTree subTree)
 {
     AttachErrorHandler(subTree);
     foreach (var nodekvp in subTree.root.children)
     {
         AddChild(root, nodekvp.Value, nodekvp.Key);
     }
 }
示例#2
0
 public void Connect <TParentProtocol>(
     AbstractProtocolHandler <TParentProtocol> parentHandler,
     ProtocolTree childTree)
     where TParentProtocol : AbstractProtocol
 {
     CheckKeyExist("Connect", parentHandler);
     AttachErrorHandler(childTree);
     foreach (var nodekvp in childTree.root.children)
     {
         AddChild(map[parentHandler], nodekvp.Value, nodekvp.Key);
     }
 }
 public static void EntryToLeaf <TLeafProtocol>(
     this ProtocolTree tree,
     LeafProtocolHandler <TLeafProtocol> leaf)
     where TLeafProtocol : LeafDataProtocol => tree.Entry(leaf.helper);
 public static void ConnectToLeaf <TParentProtocol, TLeafProtocol>(
     this ProtocolTree tree,
     AbstractProtocolHandler <TParentProtocol> parent,
     LeafProtocolHandler <TLeafProtocol> leaf)
     where TParentProtocol : AbstractProtocol
     where TLeafProtocol : LeafDataProtocol => tree.Connect(parent, leaf.helper);
 public static void Register <TLeafProtocol>(
     this ProtocolTree tree, LeafProtocolHandler <TLeafProtocol> leaf)
     where TLeafProtocol : LeafDataProtocol => tree.Register(leaf.helper);