An EventHistoryCollector lets you gather information about events that the server has generated. You create an EventHistoryCollector using the EventManager.CreateCollectorForEvents method.
The following steps show how to create an EventHistoryCollector
.
Procedure
Results
After you have created the HistoryCollector, the server appends new objects that meet the filter criteria to the collection as they occur. The system appends the new object to the collection by placing it in the first position of the latestPage and it removes the oldest object from the collection. The latestPage property of the EventHistoryCollector object has a property that consists of the 1000 most recent objects in the collection. Use a PropertyCollector to obtain the items from the latestPage property.
A HistoryCollector exists only for the duration of the session that instantiated it. You invoke the DestroyCollector operation to explicitly eliminate the collector before the session ends.