Ejemplo n.º 1
0
        /// <summary>
        /// Determines whether the specified <see cref="IConnecting"/> instance contains a connection between two specified <see cref="IConnecting"/> instances.
        /// </summary>
        /// <param name="connecting">The connecting where to look for connection.</param>
        /// <param name="from">From.</param>
        /// <param name="to">To.</param>
        /// <returns><c>true</c> if the specified connection exists; otherwise <c>false</c>.</returns>
        public static bool ContainsConnection(this IConnecting connecting, IConnecting from, IConnecting to)
        {
            foreach (ConnectionView connection in connecting.Connections)
            {
                if (connection.From == from && connection.To == to)
                {
                    return(true);
                }
            }

            return(false);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConnectionView"/> class.
 /// </summary>
 /// <param name="from">The starting <see cref="IConnecting"/> instance of the connection.</param>
 /// <param name="to">The ending <see cref="IConnecting"/> instance of the connection.</param>
 public ConnectionView(IConnecting from, IConnecting to)
 {
     _from = from;
     _to   = to;
 }
        /// <inheritdoc />
        /// <remarks>
        /// Connection is removed from the connections of this <see cref="VariableNodeSocket"/>.
        /// </remarks>
        public override void OnConnectionRemoved(IConnecting connector)
        {
            VariableNodeSocket.Connections.Remove(((VariableView)connector).Variable);

            UpdateRow();
        }
        /// <inheritdoc />
        /// <remarks>
        /// Connection is removed from the connections of this <see cref="SignalNodeSocket"/>.
        /// </remarks>
        public override void OnConnectionRemoved(IConnecting connector)
        {
            Debug.Assert(SignalNodeSocket.Connections.Contains(((SignalInNodeSocketView)connector).SignalNodeSocket), "Scripting component already contains this connection.");

            SignalNodeSocket.Connections.Remove(((SignalInNodeSocketView)connector).SignalNodeSocket);
        }
 /// <inheritdoc />
 public override void OnConnectionRemoved(IConnecting connector)
 {
 }
 /// <inheritdoc />
 public override void OnConnectionAdded(IConnecting connector)
 {
 }
 /// <inheritdoc />
 public abstract void OnConnectionRemoved(IConnecting connector);
 /// <inheritdoc />
 public abstract void OnConnectionAdded(IConnecting connector);
 /// <inheritdoc />
 public void OnConnectionRemoved(IConnecting connector)
 {
 }
 /// <inheritdoc />
 public void OnConnectionAdded(IConnecting connector)
 {
 }