Exemplo n.º 1
0
 public Attendee Add(Participant participant, AttendeeType attendeeType = AttendeeType.Required, ResponseType?responseType = null, ExDateTime?replyTime = null, bool checkExisting = false)
 {
     return(AttendeeCollection.InternalAdd(this, delegate
     {
         int num;
         Attendee attendee = OccurrenceAttendeeCollection.FindAttendee(this.exceptionAttendeeCollection, participant, this.occurrence.Session as MailboxSession, out num);
         if (attendee != null && attendee.HasFlags(RecipientFlags.ExceptionalDeleted))
         {
             attendee.RecipientFlags &= ~RecipientFlags.ExceptionalDeleted;
             this.exceptionAttendeeCollection.Remove(attendee);
             this.exceptionAttendeeCollection.LocationIdentifierHelperInstance.SetLocationIdentifier(46965U);
             attendee = this.exceptionAttendeeCollection.AddClone(attendee);
             attendee.AttendeeType = attendeeType;
             if (responseType != null)
             {
                 attendee.ResponseType = responseType.Value;
             }
             if (replyTime != null)
             {
                 attendee.ReplyTime = replyTime.Value;
             }
         }
         else
         {
             attendee = this.exceptionAttendeeCollection.Add(participant, attendeeType, responseType, replyTime, checkExisting);
         }
         this.attendeeCollection.Add(attendee);
         return attendee;
     }, participant, attendeeType, responseType, checkExisting));
 }
Exemplo n.º 2
0
        public void RemoveAt(int index)
        {
            Attendee match = this.attendeeCollection[index];

            this.attendeeCollection.RemoveAt(index);
            MailboxSession session = this.occurrence.Session as MailboxSession;
            int            num;
            Attendee       attendee = OccurrenceAttendeeCollection.FindAttendee(this.masterAttendeeCollection, match, session, out num);
            int            index2;
            Attendee       attendee2 = OccurrenceAttendeeCollection.FindAttendee(this.exceptionAttendeeCollection, match, session, out index2);

            if (attendee == null && attendee2 != null)
            {
                this.exceptionAttendeeCollection.LocationIdentifierHelperInstance.SetLocationIdentifier(50677U);
                this.exceptionAttendeeCollection.RemoveAt(index2);
            }
            else if (attendee != null)
            {
                if (attendee2 == null)
                {
                    this.exceptionAttendeeCollection.LocationIdentifierHelperInstance.SetLocationIdentifier(47605U);
                    attendee2 = this.exceptionAttendeeCollection.AddClone(attendee);
                }
                attendee2.RecipientFlags |= RecipientFlags.ExceptionalDeleted;
            }
            if (index < this.masterAttendeeCount)
            {
                this.masterAttendeeCount--;
            }
        }
Exemplo n.º 3
0
        private void AddExceptionalAttendee(Attendee attendee)
        {
            int      num;
            Attendee attendee2 = OccurrenceAttendeeCollection.FindAttendee(this.attendeeCollection, attendee, this.occurrence.Session as MailboxSession, out num);

            if (attendee2 != null && num < this.masterAttendeeCount)
            {
                this.attendeeCollection.RemoveAt(num);
            }
            this.attendeeCollection.Add(attendee);
        }