Hello,
Minor and handy features to request:
1 CalendarReader.GetTotalItemsCount or CalendarReader.GetTotalEventsCount or CalendarReader.Count
My code:
Public Function GetTotalItemsCount(ByVal InputCalendar As String) As Integer
Dim MyCounter As Integer = 0
Dim MyCalendarReader As CalendarReader = Nothing
Try
MyCalendarReader = New CalendarReader(InputCalendar, ASPLoadSetICS)
If MyCalendarReader IsNot Nothing Then
While MyCalendarReader.NextEvent
MyCounter = MyCounter + 1
End While
End If
Finally
GetTotalItemsCount = MyCounter
End Try
End Function
2 CalendarReader.IsMultiEvents (Boolean)
My achievement:
Public Function IsMultiEvents(ByVal InputCalendar As String) As Boolean
Dim MyCounter As Integer = 0
Dim MyCalendarReader As CalendarReader = Nothing
Try
MyCalendarReader = New CalendarReader(InputCalendar, ASPLoadSetICS)
If MyCalendarReader IsNot Nothing Then
While MyCalendarReader.NextEvent
MyCounter = MyCounter + 1
If MyCounter > 1 Then Return True
End While
End If
Finally
If MyCounter > 1 Then IsMultiEvents = True
End Try
AND LoadOptions:
Public Function ASPLoadSetICS() As AppointmentLoadOptions
On Error Resume Next
ASPLoadSetICS = New AppointmentLoadOptions
ASPLoadSetICS.ApplyLocalTZ = True
ASPLoadSetICS.DetectEncoding = True
ASPLoadSetICS.IgnoreSmtpAddressCheck = True
End Function
3 Finally, CalendarReader.Dispose so we can do Using / End Using - This is important
Please let me know how it is?
If you have any suggestions for updating my functions for better/faster/safer achievement, please kindly comment