Exemple #1
0
 /// <summary>
 /// Generates a view that orders events that arrive out-of-order, using timestamp-values
 /// provided by an expression, and by comparing that timestamp value to engine system time.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="esperQuery">The esper query.</param>
 /// <param name="property">The property to use for the timestamp.</param>
 /// <param name="timePeriod">the time period specifying the time interval that an arriving event should maximally be held, in order to consider older events arriving at a later time</param>
 /// <returns></returns>
 /// <exception cref="System.ArgumentException">at least one property must be provided</exception>
 public static EsperQuery <T> TimeOrdered <T>(this EsperQuery <T> esperQuery, string property, TimeSpan timePeriod)
 {
     return(esperQuery.FilterView(() => View.Create("time_order",
                                                    new PropertyValueExpression(property),
                                                    timePeriod.ToTimePeriodExpression())));
 }