/// <summary> /// Basic constructor /// </summary> /// <param name="pattern"> The pattern to look for </param> /// <param name="processDelegate"> The callback to invoke when such a pattern is identified </param> internal PatternMatchRule(Node pattern, ProcessNodeDelegate processDelegate) : base(pattern.Op.OpType, processDelegate) { Debug.Assert(pattern != null, "null pattern"); Debug.Assert(pattern.Op != null, "null pattern Op"); m_pattern = pattern; }
// <summary> // Basic constructor // </summary> // <param name="pattern"> The pattern to look for </param> // <param name="processDelegate"> The callback to invoke when such a pattern is identified </param> internal PatternMatchRule(Node pattern, ProcessNodeDelegate processDelegate) : base(pattern.Op.OpType, processDelegate) { DebugCheck.NotNull(pattern); DebugCheck.NotNull(pattern.Op); m_pattern = pattern; }
/// <summary> /// Basic constructor /// </summary> /// <param name="pattern">The pattern to look for</param> /// <param name="processDelegate">The callback to invoke when such a pattern is identified</param> internal PatternMatchRule(Node pattern, ProcessNodeDelegate processDelegate) : base(pattern.Op.OpType, processDelegate) { Debug.Assert(pattern != null, "null pattern"); Debug.Assert(pattern.Op != null, "null pattern Op"); m_pattern = pattern; }
/// <summary> /// Basic constructor /// </summary> /// <param name="pattern"> The pattern to look for </param> /// <param name="processDelegate"> The callback to invoke when such a pattern is identified </param> internal PatternMatchRule(Node pattern, ProcessNodeDelegate processDelegate) : base(pattern.Op.OpType, processDelegate) { DebugCheck.NotNull(pattern); DebugCheck.NotNull(pattern.Op); m_pattern = pattern; }
/// <summary> /// Basic constructor /// </summary> /// <param name="opType"> The OpType we're interested in processing </param> /// <param name="nodeProcessDelegate"> The callback to invoke </param> protected Rule(OpType opType, ProcessNodeDelegate nodeProcessDelegate) { DebugCheck.NotNull(nodeProcessDelegate); Debug.Assert(opType != OpType.NotValid, "bad OpType"); Debug.Assert(opType != OpType.Leaf, "bad OpType - Leaf"); m_opType = opType; m_nodeDelegate = nodeProcessDelegate; }
/// <summary> /// Basic constructor /// </summary> /// <param name="opType">The OpType we're interested in processing</param> /// <param name="nodeProcessDelegate">The callback to invoke</param> protected Rule(OpType opType, ProcessNodeDelegate nodeProcessDelegate) { Debug.Assert(nodeProcessDelegate != null, "null process delegate"); Debug.Assert(opType != OpType.NotValid, "bad OpType"); Debug.Assert(opType != OpType.Leaf, "bad OpType - Leaf"); m_opType = opType; m_nodeDelegate = nodeProcessDelegate; }
public void WalkInOrder( ProcessNodeDelegate processFunction, object data ) { if (root != null) { _WalkInOrder(root, processFunction, data); } }
public void Walk( ProcessNodeDelegate processFunction, object data ) { for (var i = 0; i < Count; i++) { processFunction(heap[i], data); } }
void _WalkInOrder( BinarySearchTreeNode <T> node, ProcessNodeDelegate processFunction, object data ) { if (node.left != null) { _WalkInOrder(node.left, processFunction, data); } processFunction((object)node, data); if (node.right != null) { _WalkInOrder(node.right, processFunction, data); } }
// <summary> // Basic constructor. // </summary> // <param name="opType"> The OpType we're interested in </param> // <param name="processDelegate"> The callback to invoke when we see such an Op </param> internal SimpleRule(OpType opType, ProcessNodeDelegate processDelegate) : base(opType, processDelegate) { }
/// <summary> /// Basic constructor. /// </summary> /// <param name="opType">The OpType we're interested in</param> /// <param name="processDelegate">The callback to invoke when we see such an Op</param> internal SimpleRule(OpType opType, ProcessNodeDelegate processDelegate) : base(opType, processDelegate) { }