private void SendOrganizerRums(OrganizerRumInfo info, bool copyToSentItems, CalendarItemBase item, ref Dictionary <GlobalObjectId, List <Attendee> > sentRumsToCheck) { bool flag = false; List <Attendee> list; if (sentRumsToCheck.ContainsKey(item.GlobalObjectId)) { flag = true; list = sentRumsToCheck[item.GlobalObjectId]; for (int i = info.AttendeeList.Count - 1; i > -1; i--) { Attendee attendee = info.AttendeeList[i]; if (!attendee.IsSendable() || this.AttendeeListContainsParticipant(list, attendee.Participant, item.Session as MailboxSession)) { info.AttendeeList.RemoveAt(i); } } } else { list = new List <Attendee>(info.AttendeeList.Count); } if (info.AttendeeList.Count != 0) { if (info is UpdateRumInfo) { UpdateRumInfo rumInfo = (UpdateRumInfo)info; if (item.CalendarItemType == CalendarItemType.Occurrence) { item.SendForwardRum(rumInfo, copyToSentItems); } else { item.SendUpdateRums(rumInfo, copyToSentItems); } } else { if (!(info is CancellationRumInfo)) { throw new NotSupportedException(info.GetType().ToString()); } CancellationRumInfo rumInfo2 = (CancellationRumInfo)info; item.SendCancellationRums(rumInfo2, copyToSentItems); } list.AddRange(info.AttendeeList); if (!flag) { sentRumsToCheck.Add(item.GlobalObjectId, list); } } info.AttendeeList.Clear(); }
private void SendCancellationBasedOnFoundIntent(VersionedId cancelledVersionId) { using (CalendarItemBase calendarItemBase = CalendarItemBase.Bind(base.Session, cancelledVersionId)) { IList <Attendee> rumAttendees = this.GetRumAttendees(calendarItemBase); CancellationRumInfo info; if (this.GlobalObjectId.IsCleanGlobalObjectId) { info = CancellationRumInfo.CreateMasterInstance(rumAttendees); } else { info = CancellationRumInfo.CreateOccurrenceInstance(this.GlobalObjectId.Date, rumAttendees); } Dictionary <GlobalObjectId, List <Attendee> > dictionary = new Dictionary <GlobalObjectId, List <Attendee> >(1); RumAgent.Instance.SendRums(info, false, calendarItemBase, ref dictionary); } }
protected override void SendMeetingCancellations(MailboxSession mailboxSession, bool isToAllAttendees, IList <Attendee> removedAttendeeList, bool copyToSentItems, bool ignoreSendAsRight, CancellationRumInfo rumInfo) { if (removedAttendeeList.Count == 0) { return; } ExTraceGlobals.MeetingMessageTracer.Information <GlobalObjectId, int>((long)this.GetHashCode(), "Storage.CalendarItemBase.SendMeetingCancellations: GOID={0}; users={1}", base.GlobalObjectId, removedAttendeeList.Count); using (MeetingCancellation meetingCancellation = base.CreateMeetingCancellation(mailboxSession, isToAllAttendees, null, null)) { meetingCancellation.CopySendableParticipantsToMessage(removedAttendeeList); base.LocationIdentifierHelperInstance.SetLocationIdentifier(33141U, LastChangeAction.SendMeetingCancellations); base.SendMessage(mailboxSession, meetingCancellation, copyToSentItems, ignoreSendAsRight); } }
private void DecorateCancellationRumBody(MessageItem message, string textToInject, CancellationRumInfo info) { this.DecorateRumBody(message, textToInject, this.GetLocalizedString(ClientStrings.CancellationRumDescription, message), null); }
private MeetingCancellation CreateCancellationRum(MailboxSession mailboxSession, CancellationRumInfo rumInfo) { Action <MeetingCancellation> setBodyAndAdjustFlags = delegate(MeetingCancellation cancellation) { this.AdjustRumMessage(mailboxSession, cancellation, rumInfo, false); }; return(base.CreateMeetingCancellation(mailboxSession, false, rumInfo.AttendeeRequiredSequenceNumber, setBodyAndAdjustFlags, false, null, null)); }