JackSharp.Controller.GetAndSendConnections C# (CSharp) Method

GetAndSendConnections() private method

private GetAndSendConnections ( List allPorts ) : void
allPorts List
return void
        unsafe void GetAndSendConnections(List<PortReference> allPorts)
        {
            // In ports are connected to out ports, so we only need to map these.
            foreach (PortReference port in allPorts.Where(p => p.Direction == Direction.Out)) {
                IntPtr connectedPortNames = PortApi.GetConnections (port.PortPointer);
                List<PortReference> connectedPorts = PortListFromPointer (connectedPortNames);

                if (ConnectionChanged != null) {
                    foreach (PortReference connected in connectedPorts) {
                        ConnectionChanged (this, new ConnectionChangeEventArgs (port, connected, ChangeType.New));
                    }
                }
                Invoke.Free (connectedPortNames);
            }
        }