コード例 #1
0
        public IReadOnlyList <ProjectInformation> FindExamples()
        {
            var result = new List <ProjectInformation>();

            var examples = FindProjects("examples").Concat(FindProjects("samples"));

            foreach (var example in examples)
            {
                result.Add(_parser.Parse(example));
            }

            return(result.OrderBy(x => x.Order).ToList());
        }
コード例 #2
0
        public IReadOnlyList <ProjectInformation> FindExamples()
        {
            var result = new List <ProjectInformation>();

            var folders  = GetExampleFolders();
            var examples = folders.Select(FindProjects).Aggregate((acc, xs) => acc.Concat(xs));

            foreach (var example in examples)
            {
                result.Add(_parser.Parse(example));
            }

            return(result
                   .Where(x => x.Visible)
                   .OrderBy(x => x.Order)
                   .ToList());
        }