zoukankan      html  css  js  c++  java
  • [Exchange 2013]创建约会和会议

    简介

    会议和约会之间的重要区别是,会议有与会者,并且没有约会。约会和会议可以是单实例或属于重复序列,但与会者、 房间或资源中不包括约会,因为它们不需要发送一条消息。在内部,Exchange 使用相同的对象有关的会议和约会。您使用 EWS 托管 API 约会类或 EWS CalendarItem元素来处理与会议和约会。

    方法

    EWS 托管 API 方法和使用的约会和会议的 EWS 操作。

    EWS托管API方法 EWS操作
    Appointment.Save CreateItem操作(日历项)
    Item.Bind GetItem操作(日历项)

    通过使用EWS托管API创建约会

    下面的代码示例演示如何使用 约会对象创建约会、 保存方法,将其保存到日历文件夹,并要验证已创建约会的 Item.Bind方法。

    此示例假定您的 Exchange 服务器进行身份验证并已获得命名服务的 ExchangeService对象。

    Appointment appointment = new Appointment(service); 
     
    // Set the properties on the appointment object to create the appointment. 
    appointment.Subject = "Tennis lesson"; 
    appointment.Body = "Focus on backhand this week."; 
    appointment.Start = DateTime.Now.AddDays(2); 
    appointment.End = appointment.Start.AddHours(1); 
    appointment.Location = "Tennis club"; 
    appointment.ReminderDueBy = DateTime.Now; 
     
    // Save the appointment to your calendar. 
    appointment.Save(SendInvitationsMode.SendToNone); 
     
    // Verify that the appointment was created by using the appointment's item ID. 
    Item item = Item.Bind(service, appointment.Id, new PropertySet(ItemSchema.Subject)); 
    Console.WriteLine("
    Appointment created: " + item.Subject + "
    "); 

    在约会对象上设置的属性之后, 保存约会到日历文件夹使用的约会对象 保存方法。

    请注意,在验证步骤中,您使用 Id与约会关联的项来验证约会是在日历文件夹中。最佳做法是,将限制到只需要由服务器返回的属性 — — 在这种情况下,约会的主题。

    通过EWS托管API创建会议

    创建会议,以及将项目保存到日历文件夹中,您通常还想要向与会者发送会议请求。下面的代码示例演示如何创建一个会议并发送会议要求。

    此示例假定您的 Exchange 服务器进行身份验证并已获得命名服务的 ExchangeService对象。

    Appointment meeting = new Appointment(service); 
     
    // Set the properties on the meeting object to create the meeting. 
    meeting.Subject = "Team building exercise"; 
    meeting.Body = "Let's learn to really work as a team and then have lunch!"; 
    meeting.Start = DateTime.Now.AddDays(2);             
    meeting.End = meeting.Start.AddHours(4); 
    meeting.Location = "Conference Room 12"; 
    meeting.RequiredAttendees.Add("Mack@contoso.com"); 
    meeting.RequiredAttendees.Add("Sadie@contoso.com"); 
    meeting.OptionalAttendees.Add("Magdalena@contoso.com"); 
    meeting.ReminderMinutesBeforeStart = 60; 
     
    // Save the meeting to the Calendar folder and send the meeting request. 
    meeting.Save(SendInvitationsMode.SendToAllAndSaveCopy); 
     
    // Verify that the meeting was created. 
    Item item = Item.Bind(service, meeting.Id, new PropertySet(ItemSchema.Subject)); 
    Console.WriteLine("
    Meeting created: " + item.Subject + "
    "); 

    后在 约会对象上设置的属性,会议对日历文件夹使用保存 保存方法。将 SendInvitationsMode枚举值设置为SendOnlyToAll或SendToAllAndSaveCopy,向与会者发送邀请。

    使用 Id与会议相关的项来验证已保存在日历文件夹中。最佳做法是,将限制由服务器返回到只需要的内容--在这种情况下,会议的主题的属性。

    总结

    调研发起会议,约会的方法。

    原文地址

    https://msdn.microsoft.com/zh-cn/dn495611

  • 相关阅读:
    $.getJSON()
    seconds
    ini_set
    validation
    component
    ini_set();
    长期阅读英文技术博客的好处
    用xml还是json
    单​手​打​字
    洛谷P1141 01迷宫
  • 原文地址:https://www.cnblogs.com/wolf-sun/p/6231963.html
Copyright © 2011-2022 走看看