예제 #1
0
        private List <GraphNode> GetCoverNodes(ContractExtractor contract, List <Subject> graphSubs)
        {
            List <GraphNode> coverNodes = new List <GraphNode>();

            foreach (Subject sub in graphSubs)
            {
                HashSet <Cover> covers;
                if (contract.GetCoversForSubject(sub, out covers))
                {
                    foreach (Cover cover in covers)
                    {
                        CoverNode node = new CoverNode(sub, cover.CoverName);
                        node.Cover = cover;
                        coverNodes.Add(node);
                    }
                }
            }

            return(coverNodes);
        }
예제 #2
0
        public List <CoverNode> GetCoverNodes()
        {
            List <CoverNode> coverNodes = new List <CoverNode>();
            List <Subject>   graphSubs  = Contract.GetAllCoverSubjects();

            foreach (Subject sub in graphSubs)
            {
                HashSet <Cover> covers;
                if (Contract.GetCoversForSubject(sub, out covers))
                {
                    foreach (Cover cover in covers)
                    {
                        CoverNode node = new CoverNode(sub, cover.CoverName);
                        node.Cover = cover;
                        coverNodes.Add(node);
                    }
                }
            }
            return(coverNodes);
        }