EventSchedule.GetScheduleEvents Method

Gets the scheduled recording events in Windows Media Center that meet the specified date-time range and state.

Syntax

public ICollection<ScheduleEvent> GetScheduleEvents(
  DateTime  beginRange,
  DateTime  endRange,
  ScheduleEventStates  state
);

Parameters

beginRange

System.DateTime.  The beginning of the date range in which to search. Any scheduled recording events that are partially or fully in this range are returned.

endRange

System.DateTime.  The end of the date range in which to search. Any scheduled recording events that are partially or fully in this range are returned.

state

Microsoft.MediaCenter.TV.Scheduling.ScheduleEventStates.  A member or bit-wise OR combination of members of the ScheduleEventStates enumeration that specify the state of the events to search for.

Return Value

System.Collections.Generic.ICollection<Microsoft.MediaCenter.TV.Scheduling.ScheduleEvent>.  Collection of scheduled recording events represented by ScheduleEvent objects.

This method raises an ArgumentException if the specified range is invalid. This method raises an EventScheduleException for any other errors.

Requirements

Reference: ehRecObj

Namespace: Microsoft.MediaCenter.TV.Scheduling

Assembly: ehRecObj.dll

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also