Exemplo n.º 1
0
        private void Clean(object state)
        {
            if (this.History > 0)
            {
                LogEventDataSearchFilter filter = new LogEventDataSearchFilter();
                filter.AddParameter(LogEventDataFields.TimeOccurred, DateTime.UtcNow.Subtract(new TimeSpan(this.History, 0, 0, 0)), Comparison.LessThan);

                this.DatabaseAgent.Delete <LogEventData>(filter);
                this.DatabaseAgent.Shrink();
            }
        }
Exemplo n.º 2
0
 public static LogEventData[] SelectListWhere(LogEventDataSearchFilter filter, DatabaseAgent agent)
 {
     return(LogEventData.Select <LogEventData>(filter, agent));
 }
Exemplo n.º 3
0
 public static LogEventData[] SelectTop(LogEventDataSearchFilter filter, int count, DatabaseAgent agent)
 {
     return(LogEventData.Select <LogEventData>(filter, count, agent));
 }
Exemplo n.º 4
0
 public static LogEventData SelectOneWhere(LogEventDataSearchFilter filter)
 {
     return(LogEventData.SelectOneWhere <LogEventData>(filter));
 }
Exemplo n.º 5
0
 public static LogEventData[] SelectListWhere(LogEventDataSearchFilter filter)
 {
     return(LogEventData.Select <LogEventData>(filter));
 }
Exemplo n.º 6
0
 public static LogEventData[] Search(LogEventDataSearchFilter filter, OrderBy orderBy, int count, DatabaseAgent agent)
 {
     return(LogEventData.Search <LogEventData>(filter, orderBy, count, agent));
 }
Exemplo n.º 7
0
 public static LogEventData[] Search(LogEventDataSearchFilter filter, OrderBy orderBy)
 {
     return(LogEventData.Search <LogEventData>(filter, orderBy));
 }
Exemplo n.º 8
0
 public static LogEventData[] Search(LogEventDataSearchFilter filter, DatabaseAgent agent)
 {
     return(LogEventData.Search <LogEventData>(filter, agent));
 }
Exemplo n.º 9
0
 public static LogEventData[] Search(LogEventDataSearchFilter filter)
 {
     return(LogEventData.Search <LogEventData>(filter));
 }
Exemplo n.º 10
0
        private void Clean(object state)
        {
            if (this.History > 0)
            {
                LogEventDataSearchFilter filter = new LogEventDataSearchFilter();
                filter.AddParameter(LogEventDataFields.TimeOccurred, DateTime.UtcNow.Subtract(new TimeSpan(this.History, 0, 0, 0)), Comparison.LessThan);

                this.DatabaseAgent.Delete<LogEventData>(filter);
                this.DatabaseAgent.Shrink();
            }
        }