コード例 #1
0
 /// <summary>
 /// Binds to an existing contact group and loads its first class properties.
 /// Calling this method results in a call to EWS.
 /// </summary>
 /// <param name="service">The service to use to bind to the contact group.</param>
 /// <param name="id">The Id of the contact group to bind to.</param>
 /// <returns>A ContactGroup instance representing the contact group corresponding to the specified Id.</returns>
 public static new ContactGroup Bind(ExchangeService service, ItemId id)
 {
     return(ContactGroup.Bind(
                service,
                id,
                PropertySet.FirstClassProperties));
 }
コード例 #2
0
 protected Item BindItem(Item item, ExchangeService service, PropertySet propertySet)
 {
     if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.Appointment))
     {
         return(Appointment.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.Task))
     {
         return(Task.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.Contact))
     {
         return(Contact.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.ContactGroup))
     {
         return(ContactGroup.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.PostItem))
     {
         return(PostItem.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.MeetingCancellation))
     {
         return(MeetingCancellation.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.MeetingRequest))
     {
         return(MeetingRequest.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.MeetingResponse))
     {
         return(MeetingResponse.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.MeetingMessage))
     {
         return(MeetingMessage.Bind(service, item.Id, propertySet));
     }
     else if (item.GetType() == typeof(Microsoft.Exchange.WebServices.Data.EmailMessage))
     {
         return(EmailMessage.Bind(service, item.Id, propertySet));
     }
     else
     {
         throw new Exception("Unknown Exchange Item type: " + item.GetType().FullName);
     }
 }