コード例 #1
0
        // Token: 0x060009A7 RID: 2471 RVA: 0x0002DA30 File Offset: 0x0002BC30
        public static EseLogRecord Parse(string input)
        {
            Match match = EseLogRecord.regex.Match(input);

            if (!match.Success)
            {
                EseLogRecord.ThrowParseError(input, EseLogRecord.regex);
            }
            string text = match.Groups["Identifier"].ToString();

            if (text == EseLogHeaderRecord.Identifier)
            {
                return(new EseLogHeaderRecord(input));
            }
            if (text == EseAttachInfoRecord.Identifier)
            {
                return(new EseAttachInfoRecord(input));
            }
            if (text == EseDatabaseFileRecord.Identifier)
            {
                return(new EseDatabaseFileRecord(input));
            }
            if (text == EseChecksumRecord.Identifier)
            {
                return(new EseChecksumRecord(input));
            }
            if (text == EsePageRecord.Identifier)
            {
                return(new EsePageRecord(input));
            }
            if (text == EseMiscRecord.Identifier)
            {
                return(new EseMiscRecord(input));
            }
            if (text == EseEofRecord.Identifier)
            {
                return(new EseEofRecord(input));
            }
            if (text == EseDatabaseResizeRecord.Identifier)
            {
                return(new EseDatabaseResizeRecord(input));
            }
            if (text == EseDatabaseTrimRecord.Identifier)
            {
                return(new EseDatabaseTrimRecord(input));
            }
            ExDiagnostics.FailFast(string.Format(CultureInfo.CurrentCulture, "identifier field {0} failed to match. input is {1}, regex is {2}", new object[]
            {
                text,
                input,
                EseLogRecord.regex.ToString()
            }), true);
            return(null);
        }
コード例 #2
0
        // Token: 0x060009A5 RID: 2469 RVA: 0x0002D9F4 File Offset: 0x0002BBF4
        protected Match Match(string input)
        {
            Regex regex = this.Regex();
            Match match = regex.Match(input);

            if (!match.Success)
            {
                EseLogRecord.ThrowParseError(input, regex);
            }
            return(match);
        }