Beispiel #1
0
 public AttendeeData(Attendee attendee)
 {
     this.attendeeType     = attendee.AttendeeType;
     this.participant      = AttendeeData.CloneParticipant(attendee.Participant);
     this.recipientIdBytes = attendee.Id.GetBytes();
 }
Beispiel #2
0
 public AttendeeData(AttendeeData other)
 {
     this.attendeeType     = other.attendeeType;
     this.participant      = AttendeeData.CloneParticipant(other.participant);
     this.recipientIdBytes = (byte[])other.recipientIdBytes.Clone();
 }
Beispiel #3
0
 public AttendeeData(Participant participant, AttendeeType attendeeType)
 {
     this.attendeeType = attendeeType;
     this.participant  = AttendeeData.CloneParticipant(participant);
 }
Beispiel #4
0
 public virtual void SetFrom(CalendarItemBase calendarItemBase)
 {
     if (this.attachmentIds == null)
     {
         this.attachmentIds = new List <AttachmentId>();
     }
     else
     {
         this.attachmentIds.Clear();
     }
     if (this.attendees == null)
     {
         this.attendees = new List <AttendeeData>();
     }
     else
     {
         this.attendees.Clear();
     }
     if (calendarItemBase.AttachmentCollection != null)
     {
         foreach (AttachmentHandle handle in calendarItemBase.AttachmentCollection)
         {
             using (Attachment attachment = calendarItemBase.AttachmentCollection.Open(handle))
             {
                 if (attachment.Id == null)
                 {
                     throw new ArgumentNullException("attachment.Id");
                 }
                 this.attachmentIds.Add(attachment.Id);
             }
         }
     }
     if (calendarItemBase.Body != null)
     {
         this.bodyText   = ItemUtility.GetItemBody(calendarItemBase, BodyFormat.TextPlain);
         this.bodyFormat = BodyFormat.TextPlain;
     }
     this.calendarItemType = calendarItemBase.CalendarItemType;
     this.endTime          = calendarItemBase.EndTime;
     this.freeBusyStatus   = calendarItemBase.FreeBusyStatus;
     try
     {
         if (calendarItemBase.ParentId != null)
         {
             this.folderId = StoreObjectId.Deserialize(calendarItemBase.ParentId.GetBytes());
         }
         else
         {
             this.folderId = null;
         }
         if (calendarItemBase.Id != null && calendarItemBase.Id.ObjectId != null)
         {
             this.id = StoreObjectId.Deserialize(calendarItemBase.Id.ObjectId.GetBytes());
         }
         else
         {
             this.id = null;
         }
     }
     catch (ArgumentException)
     {
         throw new OwaInvalidRequestException("Invalid store object id");
     }
     catch (FormatException)
     {
         throw new OwaInvalidRequestException("Invalid store object id");
     }
     if (calendarItemBase.Id != null)
     {
         this.changeKey = calendarItemBase.Id.ChangeKeyAsBase64String();
     }
     else
     {
         this.changeKey = null;
     }
     this.importance            = calendarItemBase.Importance;
     this.isAllDayEvent         = calendarItemBase.IsAllDayEvent;
     this.isMeeting             = calendarItemBase.IsMeeting;
     this.isOrganizer           = calendarItemBase.IsOrganizer();
     this.isResponseRequested   = CalendarItemBaseData.GetIsResponseRequested(calendarItemBase);
     this.location              = calendarItemBase.Location;
     this.meetingRequestWasSent = calendarItemBase.MeetingRequestWasSent;
     this.organizer             = AttendeeData.CloneParticipant(calendarItemBase.Organizer);
     if (calendarItemBase.ParentId != null)
     {
         this.parentId = StoreObjectId.FromProviderSpecificId(calendarItemBase.ParentId.ProviderLevelItemId);
     }
     if (calendarItemBase.AttendeeCollection != null)
     {
         foreach (Attendee attendee in calendarItemBase.AttendeeCollection)
         {
             this.attendees.Add(new AttendeeData(attendee));
         }
     }
     this.sensitivity = calendarItemBase.Sensitivity;
     this.startTime   = calendarItemBase.StartTime;
     this.subject     = calendarItemBase.Subject;
 }