算与会者的数目,已接受了EWS会议 [英] Count the number of attendees, that have accepted a meeting with EWS

查看:375
本文介绍了算与会者的数目,已接受了EWS会议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我奋力算与会者,谁接受了EWS会议的会议邀请。

I am struggling to count the attendees, who accepted the meeting invitation for a meeting over EWS.

我能识破假冒的organisators会议和计数本次会议所需的与会者人数。

I am able to see the organisators meetings through impersonation and count the number of required attendees for the meeting.

        //Determine User to impersonat
        string impersonated_email = "user@domain";
        service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, impersonated_email);

        //Bind User Calendar
        FolderId UserCalendarId = new FolderId(WellKnownFolderName.Calendar, impersonated_email);
        CalendarFolder UserCalendar = CalendarFolder.Bind(service, UserCalendarId);

        // Initialize values for the start and end times, and the number of appointments to retrieve.
        DateTime startDate = DateTime.Now.AddDays(0);
        DateTime endDate = startDate.AddDays(1);

        // Execute the search in the calendar folder and return the view
        CalendarView userCalendar = new CalendarView(startDate, endDate);
        userCalendar.PropertySet = new PropertySet(BasePropertySet.FirstClassProperties);
        FindItemsResults<Appointment> apt = service.FindAppointments(WellKnownFolderName.Calendar, userCalendar);

        foreach (Item item in apt.Items)
        {
            //Console.WriteLine(item.Subject);
            ServiceResponseCollection<GetItemResponse> myColl = service.BindToItems(new[] { new ItemId(item.Id.UniqueId) }, userCalendar.PropertySet);
            foreach (GetItemResponse temp in myColl)
            {
                Appointment app = (Appointment)temp.Item;
                Int32 Tn = app.RequiredAttendees.Count-1;
                Console.WriteLine(app.Subject + " " +Tn);
            }



我想也看需要多少与会者接受了会议邀请。

I would like to also see how many required attendees have accepted the meeting invitation.

亲切的问候
Xristos

Kind Regards Xristos

推荐答案

可以应能够得到响应类型如下:

You can should be able to get the response type like this:

Appointment app;

int count = app.RequiredAttendees.Count(x => (x.ResponseType.HasValue && x.ResponseType.Value == MeetingResponseType.Accept));

这篇关于算与会者的数目,已接受了EWS会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆