예제 #1
0
        /// <summary>
        /// Parse ClrMamePro dat files
        /// </summary>
        /// <param name="datFile">Path to dat file</param>
        /// <param name="platformId">Platform of dat file</param>
        /// <returns>The information records contained in the file</returns>
        internal static IEnumerable <SerialInfo> ParseSerials(string datFile, string platformId)
        {
            var lines = File.ReadAllLines(datFile);

            return(CmpParser.GetSerials(CmpParser.GetGameEntries(lines), platformId));
        }
예제 #2
0
        /// <summary>
        /// Parse ClrMamePro dat files
        /// </summary>
        /// <param name="datFile">Path to dat file</param>
        /// <param name="platformId">Platform of dat file</param>
        /// <returns>The information records contained in the file</returns>
        internal static IEnumerable <RomInfo> Parse(string datFile, string platformId)
        {
            var regex = Regex.Matches(File.ReadAllText(datFile), @"(rom \()(.+)(\))");

            return(CmpParser.GetEntries(regex, platformId));
        }