Exemplo n.º 1
0
 internal void PropagateSuccessors()
 {
     foreach (var successor in Terminator.Targets)
     {
         successors.Add(successor);
         successor.predecessors.Add(this);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Enables peer access to the given accelerator.
 /// </summary>
 /// <param name="otherAccelerator">The other accelerator.</param>
 public bool EnablePeerAccess(Accelerator otherAccelerator)
 {
     lock (syncRoot)
     {
         if (HasPeerAccess(otherAccelerator))
         {
             return(true);
         }
         if (!CanAccessPeerInternal(otherAccelerator))
         {
             return(false);
         }
         Bind();
         otherAccelerator.Disposed += PeerAccessAcceleratorDestroyed;
         storedPeerAccelerators.Add(otherAccelerator.InstanceId);
         EnablePeerAccessInternal(otherAccelerator);
         return(true);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Registers the given value to be moved later.
 /// </summary>
 /// <param name="value">The value to be moved.</param>
 public void Add(Value value)
 {
     visited.Add(value);
     toMove.Add(value);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Adds the given child node.
 /// </summary>
 /// <param name="child">The child node to add.</param>
 private void AddChild(Node child)
 {
     Debug.Assert(child.Parent == this, "Invalid child");
     children.Add(child);
 }