コード例 #1
0
        /// <summary>
        /// Called when the scene node is removed from the <see cref="ScriptingScreen"/>.
        /// Informs connector that the connection removed added.
        /// </summary>
        public override void OnSceneNodeRemoved()
        {
            Debug.Assert(From.ContainsConnection(From, To), "Connection does not exist between IConnecting ends.");
            Debug.Assert(To.ContainsConnection(From, To), "Connection does not exist between IConnecting ends.");

            From.Connections.Remove(this);
            To.Connections.Remove(this);

            From.OnConnectionRemoved(To);
            To.OnConnectionRemoved(From);
        }
コード例 #2
0
        /// <summary>
        /// Called when the scene node is added to the <see cref="ScriptingScreen"/>.
        /// Informs connector that the connection is added.
        /// </summary>
        public override void OnSceneNodeAdded()
        {
            Debug.Assert(!From.ContainsConnection(From, To), "Connection already exists between IConnecting ends.");
            Debug.Assert(!To.ContainsConnection(From, To), "Connection already exists between IConnecting ends.");

            From.Connections.Add(this);
            To.Connections.Add(this);

            From.OnConnectionAdded(To);
            To.OnConnectionAdded(From);
        }