public IEnumerable <LogEntry> FilterLogEntries(IEnumerable <LogEntry> logEntries, out bool itemsFiltered)
        {
            IEnumerable <LogEntry> entries = logEntries;

            itemsFiltered = false;
            if (this.executedWhereClause == string.Empty)
            {
                log.Debug("No query specified, returning original list.");
                this.lastExecutionStatus = "Log isn't filtered because the where condition is empty";
            }
            else
            {
                log.Debug("Query specified, executing query.");
                try
                {
                    string sqlQuery = "SELECT * FROM THIS WHERE " + executedWhereClause;

                    if (compiledQuery == null)
                    {
                        log.Debug("Compiling new query");
                        compiledQuery = new EnumerableQuery <LogEntry, LogEntry>(sqlQuery);
                        compiledQuery.Compile();
                    }
                    else
                    {
                        log.Debug("Query is already compiled");
                    }

                    entries = entries.Query(compiledQuery);

                    this.lastExecutionStatus = "Log is filtered";
                    itemsFiltered            = true;
                    log.Debug("Query executed.");
                }
                catch (Exception ex)
                {
                    this.lastExecutionStatus = "Log isn't filtered, because of execution error";
                    this.Invoke(new MethodInvoker(() =>
                                                  MessageBox.Show(ex.Message, "Error while executing query", MessageBoxButtons.OK, MessageBoxIcon.Error)));
                }
            }
            this.lastExecutionStatus += ". Last query execution: " + DateTime.Now.ToLongTimeString();
            UpdateStatusText();
            return(entries);
        }