Example #1
0
        /// <summary>
        /// Gets the type of the recipient.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <returns>The AttendeeType.</returns>
        public static Who.AttendeeType GetRecipientType(this OlMeetingRecipientType type)
        {
            switch (type)
            {
            case OlMeetingRecipientType.olRequired:
                return(new Who.AttendeeType {
                    Value = Who.AttendeeType.EVENT_REQUIRED
                });

            case OlMeetingRecipientType.olOptional:
                return(new Who.AttendeeType {
                    Value = Who.AttendeeType.EVENT_OPTIONAL
                });
            }

            return(new Who.AttendeeType {
                Value = Who.AttendeeType.EVENT_REQUIRED
            });
        }
Example #2
0
        /// <summary>
        /// Convert Outlook recipient type to Google
        /// </summary>
        /// <param name="recipientType">Outlook's recipient type</param>
        /// <returns></returns>
        internal static EventAttendee GoogleRecipientType(EventAttendee attendee, OlMeetingRecipientType recipientType)
        {
            switch (recipientType)
            {
            case OlMeetingRecipientType.olOptional:
                attendee.Optional = true;
                break;

            case OlMeetingRecipientType.olOrganizer:
                attendee.Organizer = true;
                break;

            case OlMeetingRecipientType.olResource:
                attendee.Resource = true;
                break;

            case OlMeetingRecipientType.olRequired:
            default:
                attendee.Optional = attendee.Organizer = attendee.Resource = false;
                break;
            }
            return(attendee);
        }