ISubscription.GetEventHistory(DateTime, DateTime)
Retrieves subscription and synchronization events that occurred during the specified time period.
public SubscriptionEventCollection GetEventHistory(
DateTime fromDate,
DateTime toDate
);
Public Function GetEventHistory( _
ByVal fromDate As DateTime, _
ByVal toDate As DateTime _
) As SubscriptionEventCollection
Implements ISubscription.GetEventHistory
Parameters
- fromDate
Begin date that is used to search for events. Specify the date in Coordinated Universal Time. - toDate
End date that is used to search for events. Specify the date in Coordinated Universal Time.
Return Values
A SubscriptionEventCollection collection that contains the subscription and synchronization events that occurred during the specified time period (inclusively). The collection is unordered. The collection is empty if no events occurred during the time period.
Exceptions
Exception type | Condition |
---|---|
ArgumentOutOfRangeException | fromDate cannot be greater than toDate. |
Remarks
The number of events that are returned is partially dependent on the length of time the events are retained in the database. For more information, see IUpdateServerConfiguration.ServerEventExpirationTime.
To retrieve all subscription and synchronization events, call ISubscription.GetEventHistory().
To retrieve synchronization-specific information, for example, when the start and end time of the synchronization process and a list of any errors that occurred, call ISubscription.GetSynchronizationHistory(DateTime, DateTime).
Requirements
Server | Requires Windows Server 2003 or Windows 2000 Server SP4 and later. |
Namespace | Defined in Microsoft.UpdateServices.Administration. |
Assembly | Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll). |
.NET Framework | Requires .NET Framework 1.1. |