C# 是否接受发送给用户的日历计划请求?

C# 是否接受发送给用户的日历计划请求?,c#,exchange-server,C#,Exchange Server,我正在计划exchange server中的资源。我可以使用下面的c代码获取用户忙/闲状态 GetUserAvailabilityResults results = serviceData.GetUserAvailability(attendees, availabilityOptions.DetailedSuggestionsWindow, AvailabilityData.FreeBusyAndSuggestions, availabilityOptions); 并

我正在计划exchange server中的资源。我可以使用下面的c代码获取用户忙/闲状态

GetUserAvailabilityResults results = serviceData.GetUserAvailability(attendees,
    availabilityOptions.DetailedSuggestionsWindow,
    AvailabilityData.FreeBusyAndSuggestions,
    availabilityOptions);
并且能够向用户发送调度请求

ExchangeService serviceData = (ExchangeService)Session["serviceData"];
Appointment appointment = new Appointment(serviceData);
appointment.Subject = model.Title;
appointment.Body = model.Description;
appointment.Start = model.Start;
appointment.End = model.End;
appointment.RequiredAttendees.Add(model.OwnerID);

appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

现在可以检查发送给用户的日程安排请求是否被接受了吗?

如果要检查会议的接受状态,只需在约会所有者日历中遍历约会对象的Attenders集合,例如

            foreach(Attendee attendee in aptobj.RequiredAttendees){
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }

        }
        foreach (Attendee attendee in aptobj.OptionalAttendees)
        {
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }
        }
干杯
Glen

如果要检查会议的接受状态,只需遍历约会所有者日历中约会对象的Attenders集合,例如

            foreach(Attendee attendee in aptobj.RequiredAttendees){
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }

        }
        foreach (Attendee attendee in aptobj.OptionalAttendees)
        {
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }
        }
干杯 峡谷