Exemplo n.º 1
0
        // ------------------
        // Stubbing from file
        // ------------------

        private JamInfo?StubJamInfoFromFile(FilePath jamDirectoryPath)
        {
            var jamInfoPath = FilesystemSearch.ForFilesIn(jamDirectoryPath)
                              .WithExtensions(".jaminfo")
                              .FindAll()
                              .FirstOrDefault();

            if (jamInfoPath == null)
            {
                return(null);
            }

            return(JamFilesReader.TryLoadJamInfo(jamInfoPath.Value));
        }
Exemplo n.º 2
0
        public JamInfo?TryLoadJamInfo(FilePath jamFilePath)
        {
            var jamInfo = JamFilesReader.TryLoadJamInfo(jamFilePath);

            if (jamInfo == null)
            {
                return(null);
            }

            var jamDirectoryPath = jamFilePath.GetParentDirectoryPath() !.Value;
            var entriesPath      = jamDirectoryPath.Append(jamInfo.EntriesSubpath);

            jamInfo.Entries = LoadEntriesFromStubs(entriesPath, jamInfo.EntriesStubs).ToList();

            return(jamInfo);
        }