/// <summary> /// Create a Request.Attendees instance by the attendee email address. /// </summary> /// <param name="attendeeEmail">The email address of the attendee</param> /// <returns>The created Request.Attendees instance.</returns> internal static Request.Attendees CreateAttendees(string attendeeEmail) { List <Request.AttendeesAttendee> attendeelist = new List <Request.AttendeesAttendee> { new Request.AttendeesAttendee { Email = attendeeEmail, Name = attendeeEmail, AttendeeStatus = 0, AttendeeTypeSpecified = true, AttendeeType = 1 } }; Request.Attendees attendees = new Request.Attendees { Attendee = attendeelist.ToArray() }; return(attendees); }
/// <summary> /// Set the value of common meeting properties /// </summary> /// <param name="subject">The subject of the meeting.</param> /// <param name="attendeeEmailAddress">The email address of attendee.</param> /// <returns>The key and value pairs of common meeting properties.</returns> internal static Dictionary <Request.ItemsChoiceType8, object> SetMeetingProperties(string subject, string attendeeEmailAddress, ITestSite testSite) { Dictionary <Request.ItemsChoiceType8, object> propertiesToValueMap = new Dictionary <Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject, subject } }; // Set the subject element. // MeetingStauts is set to 1, which means it is a meeting and the user is the meeting organizer. byte meetingStatus = 1; propertiesToValueMap.Add(Request.ItemsChoiceType8.MeetingStatus, meetingStatus); // Set the UID string uID = Guid.NewGuid().ToString(); if (Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", testSite).Equals("16.0") || Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", testSite).Equals("16.1")) { propertiesToValueMap.Add(Request.ItemsChoiceType8.ClientUid, uID); } else { propertiesToValueMap.Add(Request.ItemsChoiceType8.UID, uID); } // Set the TimeZone string timeZone = Common.GetTimeZone("(UTC) Coordinated Universal Time", 0); propertiesToValueMap.Add(Request.ItemsChoiceType8.Timezone, timeZone); // Set the attendee to user2 Request.Attendees attendees = TestSuiteHelper.CreateAttendees(attendeeEmailAddress); propertiesToValueMap.Add(Request.ItemsChoiceType8.Attendees, attendees); return(propertiesToValueMap); }
/// <summary> /// Create a Request.Attendees instance with required child elements. /// </summary> /// <param name="attendeeEmailAddress">The attendee email address</param> /// <param name="attendeeName">The attendee display name</param> /// <returns>The created Request.Attendees instance.</returns> internal static Request.Attendees CreateAttendeesRequired(string[] attendeeEmailAddress, string[] attendeeName) { List <Request.AttendeesAttendee> attendeelist = new List <Request.AttendeesAttendee>(); for (int i = 0; i < attendeeEmailAddress.Length; i++) { Request.AttendeesAttendee attendee = new Request.AttendeesAttendee { Email = attendeeEmailAddress[i], Name = attendeeName[i], AttendeeType = 1, AttendeeTypeSpecified = true }; attendeelist.Add(attendee); } Request.Attendees attendees = new Request.Attendees { Attendee = attendeelist.ToArray() }; return(attendees); }
/// <summary> /// Create a Request.Attendees instance with required child elements. /// </summary> /// <param name="attendeeEmailAddress">The attendee email address</param> /// <param name="attendeeName">The attendee display name</param> /// <returns>The created Request.Attendees instance.</returns> internal static Request.Attendees CreateAttendeesRequired(string[] attendeeEmailAddress, string[] attendeeName) { List<Request.AttendeesAttendee> attendeelist = new List<Request.AttendeesAttendee>(); for (int i = 0; i < attendeeEmailAddress.Length; i++) { Request.AttendeesAttendee attendee = new Request.AttendeesAttendee { Email = attendeeEmailAddress[i], Name = attendeeName[i], AttendeeType = 1, AttendeeTypeSpecified = true }; attendeelist.Add(attendee); } Request.Attendees attendees = new Request.Attendees { Attendee = attendeelist.ToArray() }; return attendees; }
/// <summary> /// Create a Request.Attendees instance by the attendee email address. /// </summary> /// <param name="attendeeEmail">The email address of the attendee</param> /// <returns>The created Request.Attendees instance.</returns> internal static Request.Attendees CreateAttendees(string attendeeEmail) { List<Request.AttendeesAttendee> attendeelist = new List<Request.AttendeesAttendee> { new Request.AttendeesAttendee { Email = attendeeEmail, Name = attendeeEmail, AttendeeStatus = 0, AttendeeTypeSpecified=true, AttendeeType = 1 } }; Request.Attendees attendees = new Request.Attendees { Attendee = attendeelist.ToArray() }; return attendees; }
/// <summary> /// Set the value of common meeting properties /// </summary> /// <param name="subject">The subject of the meeting.</param> /// <param name="attendeeEmailAddress">The email address of attendee.</param> /// <returns>The key and value pairs of common meeting properties.</returns> private Dictionary<Request.ItemsChoiceType8, object> SetMeetingProperties(string subject, string attendeeEmailAddress, ITestSite testSite) { Dictionary<Request.ItemsChoiceType8, object> propertiesToValueMap = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject, subject } }; // Set the subject element. // MeetingStauts is set to 1, which means it is a meeting and the user is the meeting organizer. byte meetingStatus = 1; propertiesToValueMap.Add(Request.ItemsChoiceType8.MeetingStatus, meetingStatus); // Set the UID string uID = Guid.NewGuid().ToString(); if (Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", testSite).Equals("16.0")) { propertiesToValueMap.Add(Request.ItemsChoiceType8.ClientUid, uID); } else { propertiesToValueMap.Add(Request.ItemsChoiceType8.UID, uID); } // Set the TimeZone string timeZone = Common.GetTimeZone("(UTC) Coordinated Universal Time", 0); propertiesToValueMap.Add(Request.ItemsChoiceType8.Timezone, timeZone); List<Request.AttendeesAttendee> attendeelist = new List<Request.AttendeesAttendee> { new Request.AttendeesAttendee { Email = attendeeEmailAddress, Name = attendeeEmailAddress, AttendeeStatus = 0, AttendeeTypeSpecified=true, AttendeeType = 1 } }; // Set the attendee to user2 Request.Attendees attendees = new Request.Attendees { Attendee = attendeelist.ToArray() }; propertiesToValueMap.Add(Request.ItemsChoiceType8.Attendees, attendees); return propertiesToValueMap; }