示例#1
0
        public IEnumerable <AssetFileCombination> DetermineCombinations(AssetTagPlan plan)
        {
            var grouper = new AssetGrouper <IAssetTagSubject>();
            var groups  = grouper.GroupSubjects(plan.Subjects, s => s is AssetFile)
                          .Where(x => x.Count > 1);

            foreach (var @group in groups)
            {
                yield return(new ScriptFileCombination(@group.Cast <AssetFile>().ToList()));
            }
        }
示例#2
0
        public IEnumerable <AssetFileCombination> DetermineCombinations(AssetTagPlan plan)
        {
            var folders = plan.Subjects.OfType <AssetFile>().Select(x => x.ContentFolder()).Distinct();

            foreach (var folder in folders)
            {
                var grouper = new AssetGrouper <IAssetTagSubject>();
                var groups  = grouper.GroupSubjects(plan.Subjects, s => s is AssetFile && s.As <AssetFile>().ContentFolder() == folder)
                              .Where(x => x.Count > 1);

                foreach (var @group in groups)
                {
                    yield return(new StyleFileCombination(folder, @group.Cast <AssetFile>().ToList()));
                }
            }
        }