コード例 #1
0
ファイル: Program.cs プロジェクト: Romanx/AdventOfCode2019
        private static Dictionary <int, ChallengeBase> LoadChallenges()
        {
            var   context  = new CollectibleAssemblyLoadContext();
            var   fs       = new PhysicalFileSystem();
            UPath basePath = fs.ConvertPathFromInternal(AppDomain.CurrentDomain.BaseDirectory);

            var challenges = fs.EnumerateFileEntries(basePath, "Day*.dll")
                             .Select(entry => LoadChallenge(entry, context))
                             .ToDictionary(k => k.Day, v => v);

            return(challenges);