DXOutlook365Sync.MergeConflictResolve Event
Allows you to resolve a merge conflict.
Namespace: DevExpress.XtraScheduler.Microsoft365Calendar
Assembly: DevExpress.XtraScheduler.v26.1.Microsoft365Calendar.dll
NuGet Package: DevExpress.Scheduler.Core.Desktop.Microsoft365Calendar
Declaration
Event Data
The MergeConflictResolve event's data class is Outlook365CalendarMergeEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| ActionType | Gets or sets a merge action. |
| Handled | Gets or sets a value that specifies whether a merge operation was handled and no default processing is required. |
| IsMergeConflict | Gets a value that indicates whether a merge conflict was detected. |
| OutlookEvent | Gets a source event in a user calendar or the default calendar in Outlook365. |
| SchedulerAppointment | Gets a source appointment. |
| TargetOutlookEvent | Gets or sets the target Outlook 365 event. |
| TargetSchedulerAppointment | Gets or sets the target appointment. |
The event data class exposes the following methods:
| Method | Description |
|---|---|
| ConvertAppointmentToEvent(Appointment) | Converts the specified appointment to an Outlook 365 event. |
| ConvertEventToAppointment(Event, String, Boolean) |
Remarks
The DXOutlook365Sync component raises the MergeConflictResolve event when a merge conflict occurs and allows you to resolve the conflict.
Use the e.ActionType property to specify a merge action.
The e.OutlookEvent and e.SchedulerAppointment properties specify the Outlook 365 event and Scheduler appointment being compared.
using DevExpress.XtraScheduler.Microsoft365Calendar;
dxOutlook365Sync1.MergeConflictResolve += DxOutlook365Sync1_MergeConflictResolve;
private void DxOutlook365Sync1_MergeConflictResolve(object sender, Outlook365CalendarMergeEventArgs e) {
DateTime appointmentLastModified = e.SchedulerAppointment.GetSchedulerChangedUTC().Value;
DateTime eventLastModified = e.OutlookEvent.LastModifiedDateTime.Value.UtcDateTime;
e.ActionType = appointmentLastModified > eventLastModified ? MergeActionType.InsertOrUpdateEvent : MergeActionType.InsertOrUpdateAppointment;
}