We are currently using DevExpress 14.1.5 WPF Libraries, in particular the Scheduler controls etc.
We are also developing a mobile counterpart in Xamarin as a result we are exploring how we can consume all Appointment data that's generated and stored from the WPF libraries.
It seems like the DevExpress XtraScheduler .NET Standard libraries, vary a little bit.
var appointment = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern); var pattern = "<RecurrenceInfo Start=\"11/25/2018 13:00:00\" End=\"12/04/2018 13:00:00\" " + "AllDay=\"True\" Id=\"a930b26f-a797-4619-b5a2-04206dbf3109\" OccurrenceCount=\"10\" Range=\"2\" />"; appointment.RecurrenceInfo.FromXml(pattern);
FromXml doesn't enable us to inform the deserializer that the Start and End dates in the XML Pattern is actually UTC values.
As a result, when we go and generate the occurences like this:[C#]
appointment.Start = DateTime.Parse("2018-11-25T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.End = DateTime.Parse("2018-11-26T13:00:00Z", CultureInfo.CurrentCulture, DateTimeStyles.RoundtripKind).ToLocalTime(); appointment.AllDay = true; var occurenceCalculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo); var items = occurenceCalculator.CalcOccurrences(new TimeInterval(DateTime.MinValue, DateTime.MaxValue), appointment); Assert.Equal(10, items.Count);
The count equates to 11 as opposed to 10, I am assuming the Start and End of the recurrence info is not being handled correctly.
Can you please supply code examples on how we should be correctly consuming our existing RecurrenceInfo xml in the context of the DevExpress XtraScheduler .NET Standard library?
Because a lot of the API and documentation appears to refer to SchedulerStorage or the SchedulerControl, all of which does not exist in the XtraScheduler .NET Standard/Cross Platform libraries.