public static IEnumerable <T> GetEvents <T>(ICollection <string> sourceIds) where T : IEvent { var criteria = new QueryCriteria { FullNames = { typeof(T).FullName } }; criteria.SourceIds.AddRange(sourceIds); return(eventLog.Query(criteria).OfType <T>()); }
public IEnumerable <IEvent> Execute() { return(_log.Query(this._criteria)); }
/// <summary> /// 读取所有事件 /// </summary> /// <param name="log"></param> /// <returns></returns> public static IEnumerable <IEvent> ReadAll(this IEventLogReader log) { return(log.Query(new QueryCriteria())); }
public IEnumerable <IEvent> Execute() { return(log.Query(criteria)); }