Show / Hide Table of Contents

Interface ICalendarUtility

Namespace: SuperOffice.Util
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public interface ICalendarUtility

Methods

ConvertToCalDateTimeUTC(DateTime, DateTime?)

Declaration
CalDateTime ConvertToCalDateTimeUTC(DateTime dt, DateTime? start = null)
Parameters
Type Name Description
DateTime dt
DateTime? start
Returns
Type Description
CalDateTime

ConvertToUTC(DateTime)

Declaration
DateTime ConvertToUTC(DateTime dt)
Parameters
Type Name Description
DateTime dt
Returns
Type Description
DateTime

CreateAttendeeFromAppointmentRowAsync(AppointmentRow, string, string, CancellationToken)

Declaration
Task<Attendee> CreateAttendeeFromAppointmentRowAsync(AppointmentRow appointment, string email = null, string role = "REQ-PARTICIPANT", CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentRow appointment
string email
string role
CancellationToken cancellationToken
Returns
Type Description
Task<Attendee>

CreateCalendar(string, DateTime?)

Creates a calendar-object with default values.

Declaration
Calendar CreateCalendar(string method = "REQUEST", DateTime? start = null)
Parameters
Type Name Description
string method
DateTime? start
Returns
Type Description
Calendar

CreateDeclineCalendar(Calendar, Attendee, string)

Creating a decline-calendar to be used when declining initial unknown or recurring invitations

Declaration
Calendar CreateDeclineCalendar(Calendar invitation, Attendee decliningAttendee, string declineComment)
Parameters
Type Name Description
Calendar invitation
Attendee decliningAttendee
string declineComment
Returns
Type Description
Calendar

CreateEmail(MailEnvelope, CalMethod, string, string)

Declaration
MailItem CreateEmail(MailEnvelope envelope, CalMethod method, string subject, string description)
Parameters
Type Name Description
MailEnvelope envelope
CalMethod method
string subject
string description
Returns
Type Description
MailItem

CreateIcalFromAppointmentUpdateAsync(int, bool, CancellationToken)

Method to generate ICS data from appointment

Declaration
Task<string> CreateIcalFromAppointmentUpdateAsync(int i_AppointmentId, bool isCancel, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int i_AppointmentId
bool isCancel
CancellationToken cancellationToken
Returns
Type Description
Task<string>

Returns null if calendar-creation failed.

CreateOnlyThisEventAsync(InvitationRecordData, AppointmentRow, AppointmentRow[], bool, CancellationToken)

Declaration
Task<CalendarEvent> CreateOnlyThisEventAsync(InvitationRecordData subSeriesRoot, AppointmentRow row, AppointmentRow[] participants, bool isUpdate = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
InvitationRecordData subSeriesRoot
AppointmentRow row
AppointmentRow[] participants
bool isUpdate
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

CreateOnlyThisUpdateEventAsync(InvitationRecordData, AppointmentRow, AppointmentRow[], CancellationToken)

Declaration
Task<CalendarEvent> CreateOnlyThisUpdateEventAsync(InvitationRecordData subSeriesRoot, AppointmentRow row, AppointmentRow[] participants, CancellationToken cancellationToken = default)
Parameters
Type Name Description
InvitationRecordData subSeriesRoot
AppointmentRow row
AppointmentRow[] participants
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

CreateThisAndForwardEventAsync(AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], Func<CalendarEvent, Task<(string uid, int sequence, string organizerEmail)>>, CancellationToken)

Declaration
Task<CalendarEvent> CreateThisAndForwardEventAsync(AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, Func<CalendarEvent, Task<(string uid, int sequence, string organizerEmail)>> uidAndSequenceFunc, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentRow row
DateTime start
DateTime end
DateTime until
AppointmentRow[] participantRows
Func<CalendarEvent, Task<(string uid, int sequence, string organizerEmail)>> uidAndSequenceFunc
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

CreateThisAndForwardInvitationEventAsync(AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], string, CancellationToken)

Declaration
Task<CalendarEvent> CreateThisAndForwardInvitationEventAsync(AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, string templateLanguage, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentRow row
DateTime start
DateTime end
DateTime until
AppointmentRow[] participantRows
string templateLanguage
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

CreateThisAndForwardUpdateEventAsync(InvitationRecordData, AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], CancellationToken)

Declaration
Task<CalendarEvent> CreateThisAndForwardUpdateEventAsync(InvitationRecordData invitationRecord, AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, CancellationToken cancellationToken = default)
Parameters
Type Name Description
InvitationRecordData invitationRecord
AppointmentRow row
DateTime start
DateTime end
DateTime until
AppointmentRow[] participantRows
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

CreateThisAndForwardUpdateEventAsync(string, AppointmentRow, DateTime, DateTime, DateTime, AppointmentRow[], CancellationToken)

Declaration
Task<CalendarEvent> CreateThisAndForwardUpdateEventAsync(string uid, AppointmentRow row, DateTime start, DateTime end, DateTime until, AppointmentRow[] participantRows, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string uid
AppointmentRow row
DateTime start
DateTime end
DateTime until
AppointmentRow[] participantRows
CancellationToken cancellationToken
Returns
Type Description
Task<CalendarEvent>

GetAllDayPreferenceInSecondsAsync(CancellationToken)

Declaration
Task<(int startInSeconds, int endInSeconds)> GetAllDayPreferenceInSecondsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<(int startInSeconds, int endInSeconds)>

GetAllMotherAppointmentIdsOfRecurrenceRuleIdAsync(int, CancellationToken)

Declaration
Task<List<int>> GetAllMotherAppointmentIdsOfRecurrenceRuleIdAsync(int recurrenceRuleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int recurrenceRuleId
CancellationToken cancellationToken
Returns
Type Description
Task<List<int>>

GetCalendar(string)

Loads calendar data and attempts to fix broken calendar

Declaration
Calendar GetCalendar(string calendarData)
Parameters
Type Name Description
string calendarData
Returns
Type Description
Calendar

GetEmailAddressFromUri(Uri)

Declaration
string GetEmailAddressFromUri(Uri uri)
Parameters
Type Name Description
Uri uri
Returns
Type Description
string

GetEventStatus(AppointmentRow)

Declaration
string GetEventStatus(AppointmentRow organizerAppointment)
Parameters
Type Name Description
AppointmentRow organizerAppointment
Returns
Type Description
string

GetParticipationStatus(AppointmentRow)

Declaration
string GetParticipationStatus(AppointmentRow appointment)
Parameters
Type Name Description
AppointmentRow appointment
Returns
Type Description
string

GetPersonEmailAddressAsync(Person, CancellationToken)

Declaration
Task<string> GetPersonEmailAddressAsync(Person person, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Person person
CancellationToken cancellationToken
Returns
Type Description
Task<string>

GetPersonFullName(Person)

Declaration
string GetPersonFullName(Person person)
Parameters
Type Name Description
Person person
Returns
Type Description
string

GetSummaryAndDescription(string, string)

Declaration
(string summary, string description) GetSummaryAndDescription(string appointmentText, string videomeetingUrl = null)
Parameters
Type Name Description
string appointmentText
string videomeetingUrl
Returns
Type Description
(string summary, string description)

GetSummaryAndDescriptionAsync(AppointmentRow, string, CancellationToken)

Declaration
Task<(string summary, string description)> GetSummaryAndDescriptionAsync(AppointmentRow row, string videomeetingUrl = null, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentRow row
string videomeetingUrl
CancellationToken cancellationToken
Returns
Type Description
Task<(string value, string tooltip)>

GetWeekdays(List<WeekDay>)

Gets the SuperOffice Weekdays equivalent from iCalendar recurrence weekdays

Declaration
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(DateTime?)

Attempts to map database-tz country-code for current principal to windows-timezone name.

Declaration
string GetWindowsTimeZoneName(DateTime? start = null)
Parameters
Type Name Description
DateTime? start
Returns
Type Description
string

Empty string if no match is found, otherwise returns the Windows-id of the timezone.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top