コード例 #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);
     }
 }
コード例 #3
0
 public static void EntryToLeaf <TLeafProtocol>(
     this ProtocolTree tree,
     LeafProtocolHandler <TLeafProtocol> leaf)
     where TLeafProtocol : LeafDataProtocol => tree.Entry(leaf.helper);
コード例 #4
0
 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);
コード例 #5
0
 public static void Register <TLeafProtocol>(
     this ProtocolTree tree, LeafProtocolHandler <TLeafProtocol> leaf)
     where TLeafProtocol : LeafDataProtocol => tree.Register(leaf.helper);