Skip to content

Conversation

@ScottBTR
Copy link

No description provided.


Appointment thisEvent = null;
var instance = await CalendarRequest.GetInstanceAsync();
var instance = await CalendarRequest.GetInstanceAsync(AppointmentStoreAccessType.AllCalendarsReadWrite);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this failing because we need to specify a different permission in manifest file - there was a second calendar permission that allowed for more access I seem to recall

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that rescap thing that you mentioned a while back I could never get working, uwp doesn't seem to understand how to handle it. This was an attempt to see if I could get enough permissions to access calendar events outside of xamarin created calendars, but not sure if it worked off the top of my head, will probably remove at this stage.

}
}

if (uwpAppointment.CalendarId != calendarId)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this if clause go inside the try-catch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved it in, but it's a bit of a custom case, e.g. it won't be caught by the catch, either that or I can also make it throw an argument exception and then put the if logic within the catch, but then I feel like it'd be doubling up the if logic

try
{
throw new ArgumentOutOfRangeException("[UWP]: Supplied event does not belong to supplied calendar");
uwpAppointment = await instance.GetAppointmentInstanceAsync(eventId, dateOfInstanceUtc);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move declaration in here
ie var uwpAppointment =

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altered accordingly

Base automatically changed from feature/readwrite_and_recurrence to temp/merge-write-calendar September 28, 2020 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants