private ItemType GetFirstOccurrenceItem(CalendarItemType meetingItem, Role role)
{
if (meetingItem != null)
{
#region Get the calendar the targeted occurrence belongs to.
CalendarItemType calendar = this.SearchSingleItem(role, DistinguishedFolderIdNameType.calendar, "IPM.Appointment", meetingItem.UID) as CalendarItemType;
Site.Assert.IsNotNull(calendar, "The calendar the targeted occurrence belongs to should exist.");
OccurrenceItemIdType occurrenceId = new OccurrenceItemIdType();
occurrenceId.RecurringMasterId = calendar.ItemId.Id;
occurrenceId.InstanceIndex = 1;
#endregion
#region Get the occurrence item
ItemInfoResponseMessageType getItem = this.GetSingleCalendarItem(role, occurrenceId);
if (getItem != null)
{
return getItem.Items.Items[0];
}
#endregion
}
return null;
}