Ejemplo n.º 1
0
        public override bool Parse()
        {
            var result = base.Parse();

            if (result)
            {
                var parseCounters = new ParseCounters(Message);
                result = parseCounters.Parse();
                if (result)
                {
                    ElapsedTime = parseCounters.ElapsedTime;
                    Reads       = parseCounters.Reads;
                    Writes      = parseCounters.Writes;
                    Fetches     = parseCounters.Fetches;
                    Marks       = parseCounters.Marks;
                    RemoveFirstCharactersOfMessage(parseCounters.CharactersParsed);
                }
            }

            if (result && !string.IsNullOrWhiteSpace(Message))
            {
                var parseTableCounts = new ParseTableCounts(Message);
                result = parseTableCounts.Parse();
                if (result)
                {
                    TableCounts = parseTableCounts.TableCounts;
                }
            }

            return(result);
        }
        public override bool Parse()
        {
            var result = base.Parse();

            if (result)
            {
                var statement = new ParseStatement(Message);
                result = statement.Parse(ParseStatement.Option.RECORDS_FETCHED);
                if (result)
                {
                    StatementId    = statement.Id;
                    Text           = statement.Text;
                    Plan           = statement.Plan;
                    Params         = statement.Params;
                    RecordsFetched = statement.RecordsFetched;
                    RemoveFirstCharactersOfMessage(statement.CharactersParsed);
                }
            }

            if (result)
            {
                var parseCounters = new ParseCounters(Message);
                result = parseCounters.Parse();
                if (result)
                {
                    ElapsedTime = parseCounters.ElapsedTime;
                    Reads       = parseCounters.Reads;
                    Writes      = parseCounters.Writes;
                    Fetches     = parseCounters.Fetches;
                    Marks       = parseCounters.Marks;
                    RemoveFirstCharactersOfMessage(parseCounters.CharactersParsed);
                }
            }

            if (result && !string.IsNullOrWhiteSpace(Message))
            {
                var parseTableCounts = new ParseTableCounts(Message);
                result = parseTableCounts.Parse();
                if (result)
                {
                    TableCounts = parseTableCounts.TableCounts;
                }
            }

            return(result);
        }