internal static IEnumerable <Imports> AsEnumerable(this ImportChain importChain) { for (var chain = importChain; chain != null; chain = chain.ParentOpt) { yield return(chain.Imports); } }
internal static Imports Single(this ImportChain importChain) { return(importChain.AsEnumerable().Single()); }