Beispiel #1
0
        public List<PortInfo> GetCompatiblePorts(Manifest manifest)
        {
            var roleCompatiblePorts = new List<PortInfo>();

            lock (configuredPorts)
            {
                foreach (PortInfo pInfo in configuredPorts.Values)
                {
                    foreach (VRole role in pInfo.GetRoles())
                    {
                        if (manifest.IsCompatibleWithRole(role))
                        {
                            //add to the list if it is not already there
                            if (!roleCompatiblePorts.Contains(pInfo))
                                roleCompatiblePorts.Add(pInfo);

                            continue;
                        }
                    }
                }
            }

            return roleCompatiblePorts;
        }