-
Notifications
You must be signed in to change notification settings - Fork 505
Conversation
* Calendar Read-Only API * Return exceptions that match test case System.NotImplementedException --> Xamarin.Essentials.NotImplementedInReferenceAssemblyException (#45)
Still in DRAFT to wait for Tizen implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things I noticed
var events = await Calendars.GetEventsAsync( | ||
SelectedCalendar?.Id, | ||
StartDateTime, | ||
EndDateTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConfigureAwait(false) could be added here
return Task.FromResult(ToEvent(calendarEvent)); | ||
} | ||
|
||
static IEnumerable<Calendar> ToCalendars(IEnumerable<EKCalendar> native) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used only, a simple select could replace this method
Name = calendar.Title | ||
}; | ||
|
||
static IEnumerable<CalendarEvent> ToEvents(IEnumerable<EKEvent> native) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also used once and could also be a select
: new List<CalendarEventAttendee>() | ||
}; | ||
|
||
static IEnumerable<CalendarEventAttendee> ToAttendees(IEnumerable<EKParticipant> inviteList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above but this is more optional here as we do not delegate construction further down the line
public TimeSpan Duration => | ||
AllDay ? TimeSpan.FromDays(1) : EndDate - StartDate; | ||
|
||
public IEnumerable<CalendarEventAttendee> Attendees { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be a list as well, all platforms return lists.
@mattleibow seems like this is more something for .NET MAUI at this point? Should we close it here and make sure to get it on the list for .NET MAUI? |
Alright closing this here. If anyone is still interested in this, please open an issue on the .NET MAUI repo, thanks! |
Description of Change
Final tweaks for #1010 so we can merge it into the next version.
Calendars API for reading calendar/event information seamlessly across uwp, iOS and Android
(Issue #996)
API
API
Types
Scenarios
Platform Compatibility
Backward Compatibility
(https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.appointments.appointment)
(https://developer.android.com/reference/android/provider/CalendarContract)
(https://developer.apple.com/documentation/eventkit/ekeventstore)
Contributors
@ScottBTR
@mkieres
@nickrandolph