private IEnumerable <Tuple <ImportRegistrationId, PartCompositionId, ExportRegistrationId> > SatisfiedPartImports(PartCompositionId partId)
 {
     return(m_PartConnections
            .InEdges(partId)
            .Select(
                edge => new Tuple <ImportRegistrationId, PartCompositionId, ExportRegistrationId>(
                    edge.ImportRegistration,
                    edge.Source,
                    edge.ExportRegistration)));
 }
        /// <summary>
        /// Disconnects the exporting group from the importing group.
        /// </summary>
        /// <param name="importingGroup">The composition ID of the importing group.</param>
        /// <param name="exportingGroup">The composition ID of the exporting group.</param>
        public void Disconnect(GroupCompositionId importingGroup, GroupCompositionId exportingGroup)
        {
            if ((importingGroup == null) || (exportingGroup == null))
            {
                return;
            }

            if (!m_GroupConnections.ContainsVertex(importingGroup) || (!m_GroupConnections.ContainsVertex(exportingGroup)))
            {
                return;
            }

            var importDefinition = m_GroupConnections
                                   .InEdges(importingGroup)
                                   .Where(edge => edge.Source.Equals(exportingGroup))
                                   .Select(edge => edge.Import)
                                   .FirstOrDefault();

            m_GroupConnections.RemoveInEdgeIf(importingGroup, edge => edge.Source.Equals(exportingGroup));

            DisconnectParts(importingGroup, importDefinition, exportingGroup);
        }