public static IList <T> GetInstances(ICategorizedTemporalList <T> list, DateTime when)
        {
            CategorizedTemporalList <T> matches = new CategorizedTemporalList <T>();

            foreach (T i in list)
            {
                if (((ICategorizedTemporal)i).EffectivePeriod.IsEffectiveOn(when))
                {
                    matches.Add(i);
                }
            }
            return(matches);
        }
        public static IList <T> GetInstances(ICategorizedTemporalList <T> list, TreeListNode category)
        {
            CategorizedTemporalList <T> matches = new CategorizedTemporalList <T>();

            foreach (T i in list)
            {
                if (((ICategorizedTemporal)i).Category == category)
                {
                    matches.Add(i);
                }
            }
            return(matches);
        }
        public static IList <T> GetInstances(ICategorizedTemporalList <T> list, DateTime when, TreeListNode parentCategory)
        {
            CategorizedTemporalList <T> matches = new CategorizedTemporalList <T>();

            foreach (T i in list)
            {
                ICategorizedTemporal item = (ICategorizedTemporal)i;
                if (item.EffectivePeriod.IsEffectiveOn(when) && item.Category.Parent == parentCategory)
                {
                    matches.Add(i);
                }
            }
            return(matches);
        }