A connection receiver point.
Inheritance: ConnectionPoint
        internal void ConnectTo(ConnectionPointReceiver receiver)
        {
            // Potentially no work to do
            if (connections.Find(c => c.Receiver == receiver) != null)
                return;

            Connection.Connect(Owner.Owner, this, receiver);
        }
        /// <summary>
        /// Disconnects this sender from the specified receiver.
        /// </summary>
        protected void Disconnect(ConnectionPointReceiver receiver)
        {
            for (int i = 0; i < connections.Count; i++)
            {
                if (connections[i].Receiver != receiver)
                    continue;

                connections[i].Disconnect();
                connections.RemoveAt(i);
                i--;
            }
        }
Exemplo n.º 3
0
 internal void RegisterConnection(ConnectionPointReceiver receiver)
 {
     ConnectionReceivers[receiver.ConnectionType] = receiver;
 }