示例#1
0
        /// <summary>
        /// Method to get all the Source Side or US Features w.r.t.affected feature
        /// </summary>
        /// <returns></returns>
        public override List <IGTKeyObject> GetRelatedFeaturesForFeatureTypes()
        {
            try
            {
                FeatureConnectivityAttributes o = GetConnectivityAttributes(AffectedFeature);
                NodeType Node = o.UpstreamNode == 1 ? NodeType.Node1 : NodeType.Node2;

                List <IGTKeyObject> oAllRelatedUpstream = null;

                oAllRelatedUpstream = GetAllRelatedFeatures(Node);

                RelatedFeatureTypes oParallelFeaturesObject = new ParallelFeatures();
                oParallelFeaturesObject.AffectedFeature = AffectedFeature;

                List <IGTKeyObject> oParallelRelatedFeatures = oParallelFeaturesObject.GetRelatedFeaturesForFeatureTypes();
                oAllRelatedUpstream = oAllRelatedUpstream.Except(oParallelRelatedFeatures, new KeyObjectComparer()).ToList <IGTKeyObject>();

                RelatedFeatureTypes oSharedSourceFeaturesObject = new SharedSources();
                oSharedSourceFeaturesObject.AffectedFeature = AffectedFeature;
                List <IGTKeyObject> oSharedSourceRelatedFeatures = oSharedSourceFeaturesObject.GetRelatedFeaturesForFeatureTypes();

                oAllRelatedUpstream = oAllRelatedUpstream.Except(oSharedSourceRelatedFeatures, new KeyObjectComparer()).ToList <IGTKeyObject>();

                return(oAllRelatedUpstream);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
        /// <summary>
        /// Method to get all the Inside Features w.r.t.affected feature
        /// </summary>
        /// <returns></returns>
        public override List <IGTKeyObject> GetRelatedFeaturesForFeatureTypes()
        {
            m_RelatedFeaturesList = new List <IGTKeyObject>();
            FeatureConnectivityAttributes o = GetConnectivityAttributes(AffectedFeature);
            NodeType Node = o.UpstreamNode == 1 ? NodeType.Node1 : NodeType.Node2;

            m_RelatedFeaturesList.Add(AffectedFeature);

            RelatedFeatureTypes oParallelFeatures = new ParallelFeatures();

            oParallelFeatures.AffectedFeature = AffectedFeature;
            List <IGTKeyObject> oParallelRelatedFeatures = oParallelFeatures.GetRelatedFeaturesForFeatureTypes();

            m_RelatedFeaturesList = m_RelatedFeaturesList.Union(oParallelRelatedFeatures, new KeyObjectComparer()).ToList <IGTKeyObject>();

            return(m_RelatedFeaturesList);
        }