Interface IAppointmentUtility
Assembly: SoDataBase.dll
Syntax
public interface IAppointmentUtility
Methods
AcceptAsync(int, RecurrenceUpdateMode, CancellationToken)
Declaration
Task AcceptAsync(int appointmentId, RecurrenceUpdateMode recurrenceUpdateMode, CancellationToken cancellationToken = default)
Parameters
Returns
CleanSynchronizerValuesFromDescription(string)
Cleaning function for stripping out prefix and dividing line InfoBridge added to their appointments
Declaration
string CleanSynchronizerValuesFromDescription(string description)
Parameters
Type |
Name |
Description |
string |
description |
|
Returns
DeleteCancelledAsync(int, RecurrenceUpdateMode, CancellationToken)
Deletes appointment if it is cancelled.
Declaration
Task DeleteCancelledAsync(int appointmentId, RecurrenceUpdateMode recurrenceUpdateMode, CancellationToken cancellationToken = default)
Parameters
Returns
GetAgenda(string, bool)
Declaration
string GetAgenda(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
GetAgendaHtml(string, bool)
Declaration
string GetAgendaHtml(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
GetAllAppointmentRowsOfRecurrenceRuleIDAsync(int, bool, CancellationToken)
Declaration
Task<AppointmentRow[]> GetAllAppointmentRowsOfRecurrenceRuleIDAsync(int recurrenceRuleId, bool motherAppointmentsOnly = false, CancellationToken cancellationToken = default)
Parameters
Returns
GetAppointmentIdFromRecurringIdAsync(int, CancellationToken)
Declaration
Task<int> GetAppointmentIdFromRecurringIdAsync(int recurringId, CancellationToken cancellationToken = default)
Parameters
Returns
GetAppointmentIdFromUIDAsync(string, CancellationToken)
Declaration
Task<int> GetAppointmentIdFromUIDAsync(string uid, CancellationToken cancellationToken = default)
Parameters
Returns
GetConnectionInfoAsync()
Declaration
Task<(ServiceAuthRecordData imap, ServiceAuthRecordData smtp, string sentFolder)> GetConnectionInfoAsync()
Returns
GetDescription(string, string)
Declaration
string GetDescription(string title, string agenda)
Parameters
Returns
GetExistingInvitationIdFromUIDAsync(string, CancellationToken)
Declaration
Task<int> GetExistingInvitationIdFromUIDAsync(string uid, CancellationToken cancellationToken = default)
Parameters
Returns
GetInvitationRecordDataAsync(int, CancellationToken)
Declaration
Task<InvitationRecordData> GetInvitationRecordDataAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
GetInvitationRecordDataFromUidAsync(string, CancellationToken)
Declaration
Task<InvitationRecordData> GetInvitationRecordDataFromUidAsync(string uid, CancellationToken cancellationToken = default)
Parameters
Returns
GetInvitationRowFromUidAsync(string, CancellationToken)
Declaration
Task<InvitationRow> GetInvitationRowFromUidAsync(string uid, CancellationToken cancellationToken = default)
Parameters
Returns
GetLastModifiedDateOfAppointment(AppointmentRow)
Returns the newest of the row's Registered and Updated fields.
The fields are stored as UTC in the DB, but are converted to DB-TZ when retrieved by the system, so we don't have to do any conversion.
Declaration
DateTime GetLastModifiedDateOfAppointment(AppointmentRow row)
Parameters
Returns
GetOrCreateInvitationIdFromUIDAsync(string, CancellationToken)
Declaration
Task<(int, bool)> GetOrCreateInvitationIdFromUIDAsync(string uid, CancellationToken cancellationToken)
Parameters
Returns
GetOrCreateUidOfAppointmentAsync(int, string, DateTime, DateTime?, DateTime?, string, CancellationToken)
Declaration
Task<(string, int)> GetOrCreateUidOfAppointmentAsync(int appointmentId, string from, DateTime lastModified, DateTime? recurringStartDate, DateTime? recurringEndDate, string templateLanguage, CancellationToken cancellationToken = default)
Parameters
Returns
GetOrganizerEmailAsync(int, CancellationToken)
Declaration
Task<string> GetOrganizerEmailAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
GetOrganizerInfoAsync(int, CancellationToken)
Declaration
Task<(string email, string fullname)> GetOrganizerInfoAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
GetParticipantAsync(int, int, int, int, AppointmentStatus, bool, CancellationToken)
Declaration
Task<ParticipantInfo> GetParticipantAsync(int associateId, int personId, int contactId, int emailId, AppointmentStatus appointmentStatus, bool sendEmail, CancellationToken cancellationToken = default)
Parameters
Returns
GetRecurrenceRuleIdOfAppointmentIdAsync(int, CancellationToken)
Declaration
Task<int> GetRecurrenceRuleIdOfAppointmentIdAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
GetRecurringSeriesForInvitedEmailAttendeeAsync(int, int, CancellationToken)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
Task<RecurringSeries> GetRecurringSeriesForInvitedEmailAttendeeAsync(int recurrenceRuleId, int invitedEmailId, CancellationToken cancellationToken = default)
Parameters
Returns
GetRecurringSeriesForInvitedPersonAsync(int, int, CancellationToken)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
Task<RecurringSeries> GetRecurringSeriesForInvitedPersonAsync(int recurrenceRuleId, int invitedPersonId, CancellationToken cancellationToken = default)
Parameters
Returns
GetRecurringSeriesOnlyMotherAppointmentsAsync(int, CancellationToken)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
Task<RecurringSeries> GetRecurringSeriesOnlyMotherAppointmentsAsync(int recurrenceRuleId, CancellationToken cancellationToken = default)
Parameters
Returns
GetTemplateLanguageAsync(int, CancellationToken)
SO Language code used for e-mail invites for this appointment.
Declaration
Task<string> GetTemplateLanguageAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
Type |
Description |
Task<string> |
SO Language code ("US", "SW" or "GE") or NULL if appointment not found.
|
GetTitle(string, bool)
Declaration
string GetTitle(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
HasCalendarAccessAsync(int, int, CancellationToken)
Checks whether the active person has access to see someones calendar.
Declaration
Task<bool> HasCalendarAccessAsync(int activePersonId, int calendarOwnerId, CancellationToken cancellationToken = default)
Parameters
Type |
Name |
Description |
int |
activePersonId |
Person id of the active person (the one logged on).
|
int |
calendarOwnerId |
The id of the person whose calendar the logged on user wants to see
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<bool> |
True if access is allowed, false otherwise.
|
HaveChanged(string, string)
Declaration
bool HaveChanged(string dataContainerValue, string carrierValue)
Parameters
Type |
Name |
Description |
string |
dataContainerValue |
|
string |
carrierValue |
|
Returns
ModifyOnRowsAsync(int, RecurrenceUpdateMode, RowModification, RowModification, CancellationToken)
Declaration
Task ModifyOnRowsAsync(int appointmentId, RecurrenceUpdateMode recurrenceUpdateMode, RowModification operationOnFirst, RowModification operationOnConsecutive, CancellationToken cancellationToken = default)
Parameters
Returns
RejectAsync(int, RecurrenceUpdateMode, string, CancellationToken)
Rejects all occurrences of the appointment for the participant. If only one occurrence exist, then only
this one is rejected (not a recurring booking appointment). The result of the rejection is saved to the database.
Declaration
Task RejectAsync(int appointmentId, RecurrenceUpdateMode recurrenceUpdateMode, string rejectReason, CancellationToken cancellationToken = default)
Parameters
Type |
Name |
Description |
int |
appointmentId |
AppointmentId of Invitation or Assignment to be set to rejected.
|
RecurrenceUpdateMode |
recurrenceUpdateMode |
How recurrence updates should be handled
|
string |
rejectReason |
Text that explains why he/she can not attend
|
CancellationToken |
cancellationToken |
|
Returns
SetSeenAsync(int, RecurrenceUpdateMode, CancellationToken)
Sets an appointment Invitation or Assignment to seen and save it to the database.
Declaration
Task SetSeenAsync(int appointmentId, RecurrenceUpdateMode recurrenceUpdateMode, CancellationToken cancellationToken = default)
Parameters
Type |
Name |
Description |
int |
appointmentId |
AppointmentId of Invitation or Assignment to be set to seen.
|
RecurrenceUpdateMode |
recurrenceUpdateMode |
How recurrence updates should be handled
|
CancellationToken |
cancellationToken |
|
Returns
TryGetNearestUidOfAppointmentIdAsync(int, int, CancellationToken)
Declaration
Task<(bool, string, int)> TryGetNearestUidOfAppointmentIdAsync(int recurrenceRuleId, int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
TryGetOfAppointmentIdFromRecurrenceIdAsync(int, CancellationToken)
Attempts to match the appointment id to a recurring id from the Invitation table.
Declaration
Task<int> TryGetOfAppointmentIdFromRecurrenceIdAsync(int recurrenceRuleId, CancellationToken cancellationToken = default)
Parameters
Returns
Attempts to match the appointment id to a Uid in the Invitation table. If the appointment id refers to a child, the mother id is used.
Declaration
Task<(bool, string)> TryGetRelatedUidOfAppointmentIdAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
TryGetUidFromRecurringAppointmentChildAsync(int, CancellationToken)
Recurring chilren are not directly connected to the mother appointment listed in the invitation table
Declaration
Task<(bool, string)> TryGetUidFromRecurringAppointmentChildAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
TryGetUidOfAppointmentIdAsync(int, CancellationToken)
Attempts to match the appointment id to a Uid in the Invitation table.
Declaration
Task<(bool, string, int, string)> TryGetUidOfAppointmentIdAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
TryGetUidOfRecurrenceIdAsync(int, CancellationToken)
Attempts to match the appointment id to a Uid in the Invitation table.
Declaration
Task<(bool, string)> TryGetUidOfRecurrenceIdAsync(int recurrenceRuleId, CancellationToken cancellationToken = default)
Parameters
Returns
UpdateLastModifiedAndIncrementSequenceAsync(int, DateTime, DateTime?, DateTime?, CancellationToken)
Declaration
Task<(int, string)> UpdateLastModifiedAndIncrementSequenceAsync(int invitationId, DateTime lastModified, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null, CancellationToken cancellationToken = default)
Parameters
Returns
UpdateLastModifiedAndIncrementSequenceOfRowAsync(InvitationRow, DateTime, DateTime?, DateTime?, CancellationToken)
Declaration
Task<(int, string)> UpdateLastModifiedAndIncrementSequenceOfRowAsync(InvitationRow row, DateTime lastModified, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null, CancellationToken cancellationToken = default)
Parameters
Returns
UpdateLastModifiedAndIncrementSequenceOfUidAsync(string, DateTime, DateTime?, DateTime?, CancellationToken)
Updates the last modified value, and increments the sequence number of the uid in the Invitation table. Returns the new sequence number.
Declaration
Task<(int, string)> UpdateLastModifiedAndIncrementSequenceOfUidAsync(string uid, DateTime lastModified, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null, CancellationToken cancellationToken = default)
Parameters
Returns
Type |
Description |
Task<(int, string)> |
The new sequence number. -1 if failed.
|
ValidateParticipantAsync(CancellationToken, params ParticipantInfo[])
Validates the information in the ParticipantInfo given as parameter and fills inn
lacking information if needed. I.e assoc_id could both represent an associate or a resource.
In the case of an associate, the person_id should also be present. Person that are
actually associates are similarly updated with their associate id.
This also ensures consistent processing later on (associates really are processed as associates, etc)
Declaration
Task ValidateParticipantAsync(CancellationToken cancellationToken, params ParticipantInfo[] participants)
Parameters
Returns
Extension Methods