public static HashSet<IScidentre> commonFindEmptyScidentres( Identifier name, IDictionary<Identifier,IScidentre> scidentres, IEnumerable<ISieve> sieves, IScope scope ) { HashSet<IScidentre> results = new HashSet<IScidentre>(); if(scidentres.ContainsKey(name)) results.Add( scidentres[name] ); foreach(ISieve d in sieves) results.UnionWith( d.findEmptyScidentres(name) ); if(scope != null) results.UnionWith(scope.upFindEmptyScidentres(name)); return results; }
HashSet<Entry> findDependencies( HashSet<Identifier> identseqs, IScope scope ) { HashSet<Entry> output = new HashSet<Entry>(); foreach(Identifier identseq in identseqs) { foreach(IScidentre ws in scope.upFindEmptyScidentres(identseq)) if(_entryLookup.ContainsKey(ws)) output.Add(_entryLookup[ws]); } return output; }