Class iCalendarUtility
Inheritance
iCalendarUtility
Assembly: SoDataBase.dll
Syntax
public static class iCalendarUtility : Object
Methods
AddParticipants(Calendar, AppointmentRow[])
Declaration
public static void AddParticipants(this Calendar calendar, params AppointmentRow[] participantRows)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
AppointmentRow[] |
participantRows |
|
AddParticipants(CalendarEvent, AppointmentRow[])
Declaration
public static void AddParticipants(this CalendarEvent calEvent, params AppointmentRow[] participantRows)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow[] |
participantRows |
|
ClearParticipants(Calendar, Boolean, Int32[])
Declaration
public static void ClearParticipants(this Calendar calendar, bool preserveOrganizerAttendee = true, params int[] personIds)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
Boolean |
preserveOrganizerAttendee |
|
Int32[] |
personIds |
|
ClearParticipants(CalendarEvent, Boolean, Int32[])
Declaration
public static void ClearParticipants(this CalendarEvent calEvent, bool preserveOrganizerAttendee = true, params int[] personIds)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
Boolean |
preserveOrganizerAttendee |
|
Int32[] |
personIds |
|
ConvertToCalDateTimeUTC(DateTime, Nullable<DateTime>)
Declaration
public static CalDateTime ConvertToCalDateTimeUTC(DateTime dt, Nullable<DateTime> start = null)
Parameters
Returns
Type |
Description |
CalDateTime |
|
ConvertToUTC(DateTime)
Declaration
public static DateTime ConvertToUTC(DateTime dt)
Parameters
Returns
CreateCalendar(String, Nullable<DateTime>)
Creates a calendar-object with default values.
Declaration
public static Calendar CreateCalendar(string method = "REQUEST", Nullable<DateTime> start = null)
Parameters
Returns
Type |
Description |
Calendar |
|
CreateCalendarEvent(AppointmentRow, String, AppointmentRow[])
Generates a calendarevent-object, and populates it with values from the organizer-appointment, and given optional parameters.
The organizer-associate is added as an attendee.
Declaration
public static CalendarEvent CreateCalendarEvent(this AppointmentRow organizerAppointment, string comment = null, AppointmentRow[] participants = null)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateCancellation(AppointmentRow, AppointmentRow[])
Declaration
public static Calendar CreateCancellation(this AppointmentRow organizerAppointment, AppointmentRow[] participants = null)
Parameters
Returns
Type |
Description |
Calendar |
|
CreateDeclineCalendar(Calendar, Attendee, String)
Creating a decline-calendar to be used when declining initial unknown or recurring invitations
Declaration
public static Calendar CreateDeclineCalendar(Calendar invitation, Attendee decliningAttendee, string declineComment)
Parameters
Type |
Name |
Description |
Calendar |
invitation |
|
Attendee |
decliningAttendee |
|
String |
declineComment |
|
Returns
Type |
Description |
Calendar |
|
CreateEmail(Calendar, MailEnvelope, CalMethod, String, String)
Declaration
public static MailItem CreateEmail(this Calendar calendar, MailEnvelope envelope, CalMethod method, string subjectPrefix = null, string description = null)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
MailEnvelope |
envelope |
|
CalMethod |
method |
|
String |
subjectPrefix |
|
String |
description |
|
Returns
Type |
Description |
MailItem |
|
CreateEmail(MailEnvelope, CalMethod, String, String)
Declaration
public static MailItem CreateEmail(MailEnvelope envelope, CalMethod method, string subject, string description)
Parameters
Returns
Type |
Description |
MailItem |
|
CreateEmailAttachment(Calendar)
Declaration
public static MailAttachment CreateEmailAttachment(this Calendar calendar)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
Returns
Type |
Description |
MailAttachment |
|
CreateIcalFromAppointmentUpdate(Int32, Boolean)
Method to generate ICS data from appointment
Declaration
public static string CreateIcalFromAppointmentUpdate(int i_AppointmentId, bool isCancel)
Parameters
Type |
Name |
Description |
Int32 |
i_AppointmentId |
|
Boolean |
isCancel |
|
Returns
Type |
Description |
String |
Returns null if calendar-creation failed.
|
CreateInvitation(AppointmentRow, Int32, Nullable<DateTime>, Nullable<DateTime>, String, AppointmentRow[])
Generates a calendar object with values from the organizerAppointment. A new unique UID is generated, and a corresponding row in the invitation table is created.
Declaration
public static Calendar CreateInvitation(this AppointmentRow organizerAppointment, int appointmentId, Nullable<DateTime> recurrenceStartDate, Nullable<DateTime> recurrenceEndDate, string templateLanguage, AppointmentRow[] participants = null)
Parameters
Returns
Type |
Description |
Calendar |
|
CreateInvitationIcal(Int32, String, String)
DO NOT REMOVE! USED BY WINDOWS CLIENT! CONSULT WITH WIN-TEAM BEFORE REMOVAL!
Declaration
public static MailAttachment CreateInvitationIcal(int i_AppointmentId, string method, string participantStatus = "ACCEPTED")
Parameters
Returns
Type |
Description |
MailAttachment |
Returns null if calendar-creation failed.
|
CreateOnlyThisEvent(InvitationRecordData, AppointmentRow, AppointmentRow[], Boolean)
Declaration
public static CalendarEvent CreateOnlyThisEvent(InvitationRecordData subSeriesRoot, AppointmentRow row, AppointmentRow[] participants, bool isUpdate = false)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateOnlyThisUpdateEvent(InvitationRecordData, AppointmentRow, AppointmentRow[])
Declaration
public static CalendarEvent CreateOnlyThisUpdateEvent(InvitationRecordData subSeriesRoot, AppointmentRow row, AppointmentRow[] participants)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateOrganizerEnvelope(CalendarEvent)
Declaration
public static MailEnvelope CreateOrganizerEnvelope(this CalendarEvent calendarEvent)
Parameters
Type |
Name |
Description |
CalendarEvent |
calendarEvent |
|
Returns
Type |
Description |
MailEnvelope |
|
CreateReply(AppointmentRow, AssociateRow, String, String)
Declaration
public static Calendar CreateReply(this AppointmentRow organizerAppointment, AssociateRow participant, string participantStatus = "ACCEPTED", string comment = null)
Parameters
Returns
Type |
Description |
Calendar |
|
CreateThisAndForwardEvent(AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], Func<CalendarEvent, ValueTuple<String, Int32, String>>)
Declaration
public static CalendarEvent CreateThisAndForwardEvent(AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, Func<CalendarEvent, ValueTuple<string, int, string>> uidAndSequenceFunc)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateThisAndForwardInvitationEvent(AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], String)
Declaration
public static CalendarEvent CreateThisAndForwardInvitationEvent(AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, string templateLanguage)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateThisAndForwardUpdateEvent(InvitationRecordData, AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[])
Declaration
public static CalendarEvent CreateThisAndForwardUpdateEvent(InvitationRecordData invitationRecord, AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateThisAndForwardUpdateEvent(String, AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[])
Declaration
public static CalendarEvent CreateThisAndForwardUpdateEvent(string uid, AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows)
Parameters
Returns
Type |
Description |
CalendarEvent |
|
CreateUpdate(AppointmentRow, Nullable<DateTime>, AppointmentRow[])
Declaration
public static Calendar CreateUpdate(this AppointmentRow organizerAppointment, Nullable<DateTime> recurringStartDate = null, AppointmentRow[] participants = null)
Parameters
Returns
Type |
Description |
Calendar |
|
GetAllDayPreferenceInSeconds()
Declaration
public static ValueTuple<int, int> GetAllDayPreferenceInSeconds()
Returns
GetAllMotherAppointmentIdsOfRecurrenceRuleId(Int32)
Declaration
public static List<int> GetAllMotherAppointmentIdsOfRecurrenceRuleId(int recurrenceRuleId)
Parameters
Type |
Name |
Description |
Int32 |
recurrenceRuleId |
|
Returns
GetCalendar(String)
Loads calendar data and attempts to fix broken calendar
Declaration
public static Calendar GetCalendar(string calendarData)
Parameters
Type |
Name |
Description |
String |
calendarData |
|
Returns
Type |
Description |
Calendar |
|
GetEmailAddress(Attendee)
Declaration
public static string GetEmailAddress(this Attendee attendee)
Parameters
Type |
Name |
Description |
Attendee |
attendee |
|
Returns
GetEmailAddress(Organizer)
Declaration
public static string GetEmailAddress(this Organizer organizer)
Parameters
Type |
Name |
Description |
Organizer |
organizer |
|
Returns
GetEmailAddressFromUri(Uri)
Declaration
public static string GetEmailAddressFromUri(Uri uri)
Parameters
Type |
Name |
Description |
Uri |
uri |
|
Returns
GetEventStatus(AppointmentRow)
Declaration
public static string GetEventStatus(AppointmentRow organizerAppointment)
Parameters
Returns
GetParticipationStatus(Appointment)
Declaration
public static string GetParticipationStatus(Appointment appointment)
Parameters
Returns
GetParticipationStatus(AppointmentRow)
Declaration
public static string GetParticipationStatus(AppointmentRow appointment)
Parameters
Returns
GetPersonEmailAddress(Person)
Declaration
public static string GetPersonEmailAddress(Person person)
Parameters
Type |
Name |
Description |
Person |
person |
|
Returns
GetPersonFullName(Person)
Declaration
public static string GetPersonFullName(Person person)
Parameters
Type |
Name |
Description |
Person |
person |
|
Returns
GetSummaryAndDescription(Appointment)
Declaration
public static ValueTuple<string, string> GetSummaryAndDescription(Appointment appointment)
Parameters
Returns
GetSummaryAndDescription(AppointmentRow, String)
Declaration
public static ValueTuple<string, string> GetSummaryAndDescription(AppointmentRow row, string videomeetingUrl = null)
Parameters
Returns
GetSummaryAndDescription(String, String)
Declaration
public static ValueTuple<string, string> GetSummaryAndDescription(string appointmentText, string videomeetingUrl = null)
Parameters
Type |
Name |
Description |
String |
appointmentText |
|
String |
videomeetingUrl |
|
Returns
GetWeekdays(List<WeekDay>)
Gets the SuperOffice Weekdays equivalent from iCalendar recurrence weekdays
Declaration
public static Weekday GetWeekdays(List<WeekDay> calendarWeek)
Parameters
Type |
Name |
Description |
List<WeekDay> |
calendarWeek |
Recurrence info about which days in a week have events
|
Returns
Type |
Description |
Weekday |
SuperOffice appointment weekdays
|
GetWindowsTimeZoneName(Nullable<DateTime>)
Attempts to map database-tz country-code for current principal to windows-timezone name.
Declaration
public static string GetWindowsTimeZoneName(Nullable<DateTime> start = null)
Parameters
Returns
Type |
Description |
String |
Empty string if no match is found, otherwise returns the Windows-id of the timezone.
|
SerializeToString(Calendar)
Declaration
public static string SerializeToString(this Calendar calendar)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
Returns
SetAllDateTimesFromAppointment(CalendarEvent, AppointmentRow)
All times are "normalized" to UTC+0.
Declaration
public static void SetAllDateTimesFromAppointment(this CalendarEvent calEvent, AppointmentRow appointment)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow |
appointment |
|
SetCreatedFromAppointment(CalendarEvent, AppointmentRow)
Declaration
public static void SetCreatedFromAppointment(this CalendarEvent calEvent, AppointmentRow appointment)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow |
appointment |
|
SetEndFromAppointment(CalendarEvent, AppointmentRow)
Declaration
public static void SetEndFromAppointment(this CalendarEvent calEvent, AppointmentRow appointment)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow |
appointment |
|
SetLastModifiedFromAppointment(CalendarEvent, AppointmentRow)
Declaration
public static void SetLastModifiedFromAppointment(this CalendarEvent calEvent, AppointmentRow appointment)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow |
appointment |
|
SetRecurrenceId(CalendarEvent, AppointmentRow, DateTime)
Sets the RecurrenceId of the CalendarEvent, combining the date-component of the appointment's DoBy, and the value of recurrenceIdTimeComponent
'stime-component.
Declaration
public static void SetRecurrenceId(this CalendarEvent calendarEvent, AppointmentRow appointmentRow, DateTime recurrenceIdTimeComponent)
Parameters
Type |
Name |
Description |
CalendarEvent |
calendarEvent |
|
AppointmentRow |
appointmentRow |
|
DateTime |
recurrenceIdTimeComponent |
|
SetRecurrenceRule(CalendarEvent, RecurrenceRuleRow)
Declaration
public static void SetRecurrenceRule(this CalendarEvent calEvent, RecurrenceRuleRow recurrenceRuleRow)
Parameters
SetStartFromAppointment(CalendarEvent, AppointmentRow)
Declaration
public static void SetStartFromAppointment(this CalendarEvent calEvent, AppointmentRow appointment)
Parameters
Type |
Name |
Description |
CalendarEvent |
calEvent |
|
AppointmentRow |
appointment |
|
ToUtf8ByteStream(Calendar)
Returns the calendar as a byte array, encoded in UTF8.
Special handling of UTF8-BOM.
Declaration
public static byte[] ToUtf8ByteStream(this Calendar calendar)
Parameters
Type |
Name |
Description |
Calendar |
calendar |
|
Returns