コード例 #1
0
 // Token: 0x06002DDB RID: 11739 RVA: 0x00104210 File Offset: 0x00102410
 private void HandleSendOnBehalf(MeetingResponse meetingResponse)
 {
     if (meetingResponse.Sender != null && string.CompareOrdinal(base.UserContext.ExchangePrincipal.LegacyDn, meetingResponse.Sender.EmailAddress) != 0)
     {
         meetingResponse.From = meetingResponse.Sender;
     }
 }
コード例 #2
0
        public void AutoSaveEditResponse()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingResponseEventHandler.AutoSaveEditResponse");
            MeetingResponse meetingResponse = null;

            try
            {
                meetingResponse = base.GetRequestItem <MeetingResponse>(new PropertyDefinition[0]);
                base.UpdateMessageForAutoSave(meetingResponse, StoreObjectType.MeetingMessage);
                this.HandleSendOnBehalf(meetingResponse);
                Utilities.SaveItem(meetingResponse, true);
                base.WriteIdAndChangeKey(meetingResponse, true);
            }
            catch (Exception ex)
            {
                ExTraceGlobals.MailTracer.TraceError <string>((long)this.GetHashCode(), "EditMeetingResponseEventHandler.AutoSaveEditResponse - Exception {0} thrown during autosave", ex.Message);
                if (Utilities.ShouldSendChangeKeyForException(ex))
                {
                    ExTraceGlobals.MailDataTracer.TraceDebug <string>((long)this.GetHashCode(), "EditMessageEventHandler.TryProcessMessageRequestForAutoSave attempt to send change key on exception: {0}", ex.Message);
                    base.SaveIdAndChangeKeyInCustomErrorInfo(meetingResponse);
                }
                base.RenderErrorForAutoSave(ex);
            }
            finally
            {
                if (meetingResponse != null)
                {
                    meetingResponse.Dispose();
                    meetingResponse = null;
                }
            }
        }
コード例 #3
0
 // Token: 0x0600079C RID: 1948 RVA: 0x000364A4 File Offset: 0x000346A4
 private static void AutoAcceptEvents(MailboxSession session, CalendarItemBase originalCalItem)
 {
     if (originalCalItem != null && !originalCalItem.IsCancelled)
     {
         bool flag;
         if (session.IsGroupMailbox())
         {
             CalendarProcessing.ProcessingRequestTracer.TraceDebug <IExchangePrincipal>(0L, "Processing meeting request for group mailbox {0}", session.MailboxOwner);
             originalCalItem.Reminder.IsSet = false;
             flag = false;
         }
         else
         {
             CalendarProcessing.ProcessingRequestTracer.TraceDebug <IExchangePrincipal>(0L, "Processing sent to self meeting request. Mailbox owner: {0}", session.MailboxOwner);
             flag = originalCalItem.ResponseRequested;
         }
         using (MeetingResponse meetingResponse = originalCalItem.RespondToMeetingRequest(ResponseType.Accept, true, flag, null, null))
         {
             if (flag)
             {
                 meetingResponse.Send();
             }
         }
         originalCalItem.Load();
     }
 }
コード例 #4
0
        public void Send()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingResponseEventHandler.SendEditResponse");
            MeetingResponse meetingResponse = base.GetRequestItem <MeetingResponse>(new PropertyDefinition[0]);

            try
            {
                if (base.UpdateMessage(meetingResponse, StoreObjectType.MeetingMessage))
                {
                    throw new OwaEventHandlerException("Unresolved recipients", LocalizedStrings.GetNonEncoded(2063734279));
                }
                if (meetingResponse.Recipients.Count == 0)
                {
                    throw new OwaEventHandlerException("No recipients", LocalizedStrings.GetNonEncoded(1878192149));
                }
                if (Utilities.RecipientsOnlyHaveEmptyPDL <Recipient>(base.UserContext, meetingResponse.Recipients))
                {
                    base.RenderPartialFailure(1389137820);
                }
                else
                {
                    this.HandleSendOnBehalf(meetingResponse);
                    base.SaveHideMailTipsByDefault();
                    ExTraceGlobals.CalendarTracer.TraceDebug((long)this.GetHashCode(), "Sending meeting response");
                    meetingResponse.Send();
                    OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("IdM");
                    if (owaStoreObjectId != null)
                    {
                        object parameter = base.GetParameter("PermanentDelete");
                        bool   flag      = parameter is bool && (bool)parameter;
                        if (flag)
                        {
                            Utilities.Delete(base.UserContext, DeleteItemFlags.SoftDelete, new OwaStoreObjectId[]
                            {
                                owaStoreObjectId
                            });
                        }
                        else
                        {
                            Utilities.Delete(base.UserContext, DeleteItemFlags.MoveToDeletedItems, new OwaStoreObjectId[]
                            {
                                owaStoreObjectId
                            });
                        }
                    }
                }
            }
            finally
            {
                if (meetingResponse != null)
                {
                    meetingResponse.Dispose();
                    meetingResponse = null;
                }
            }
        }
コード例 #5
0
        private Item BindToItemWithItemClass(StoreObjectId id, string itemClass, PropertyDefinition[] properties)
        {
            Item result;

            if (ObjectClass.IsReport(itemClass))
            {
                result = ReportMessage.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsMessage(itemClass, false))
            {
                result = MessageItem.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsPost(itemClass))
            {
                result = PostItem.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsCalendarItem(itemClass))
            {
                result = CalendarItem.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsMeetingRequest(itemClass))
            {
                result = MeetingRequest.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsMeetingResponse(itemClass))
            {
                result = MeetingResponse.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsMeetingCancellation(itemClass))
            {
                result = MeetingCancellation.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsContact(itemClass))
            {
                result = Contact.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsTask(itemClass))
            {
                Task task = Task.Bind(this.mailboxSession, id, true, properties);
                task.SuppressRecurrenceAdjustment = true;
                result = task;
            }
            else if (ObjectClass.IsDistributionList(itemClass))
            {
                result = DistributionList.Bind(this.mailboxSession, id, properties);
            }
            else if (ObjectClass.IsGenericMessage(itemClass))
            {
                result = MessageItem.Bind(this.mailboxSession, id, properties);
            }
            else
            {
                result = Item.Bind(this.mailboxSession, id, properties);
            }
            return(result);
        }
コード例 #6
0
        private static MeetingResponse EditResponseInternal(ResponseType responseType, CalendarItemBase calendarItemBase)
        {
            ExTraceGlobals.CalendarTracer.TraceDebug(0L, "Create meeting response and edit");
            calendarItemBase.LocationIdentifierHelperInstance.SetLocationIdentifier(54431U, LastChangeAction.RespondToMeetingRequest);
            MeetingResponse meetingResponse = MeetingUtilities.CreateMeetingResponse(responseType, calendarItemBase, true);

            meetingResponse.Save(SaveMode.ResolveConflicts);
            MeetingUtilities.ProcessCalendarItemAfterResponse(responseType, calendarItemBase, true);
            return(meetingResponse);
        }
コード例 #7
0
        private static void UpdateMeetingResponseSubject(MeetingResponse meetingResponse)
        {
            string subject = meetingResponse.Subject;
            string text    = (meetingResponse.TryGetProperty(ItemSchema.NormalizedSubject) as string) ?? string.Empty;

            if (subject.Length > 255)
            {
                int num = subject.Length - 255;
                meetingResponse[ItemSchema.NormalizedSubject] = text.Substring(0, text.Length - num);
            }
        }
コード例 #8
0
 // Token: 0x060002C4 RID: 708 RVA: 0x000186F8 File Offset: 0x000168F8
 public MeetingResponseWriter(MeetingResponse meetingResponse, UserContext userContext, bool isEmbeddedItem) : base(meetingResponse, userContext)
 {
     this.meetingResponse = meetingResponse;
     if (!isEmbeddedItem && !meetingResponse.IsDelegated())
     {
         this.isOrganizer = base.ProcessMeetingMessage(meetingResponse, Utilities.IsItemInDefaultFolder(meetingResponse, DefaultFolderType.Inbox));
         if (this.isOrganizer)
         {
             this.AttendeeResponseWell = new CalendarItemAttendeeResponseRecipientWell(userContext, base.CalendarItemBase);
         }
     }
     this.recipientWell = new MessageRecipientWell(userContext, meetingResponse);
 }
コード例 #9
0
 private static void NonEditResponseInternal(ResponseType responseType, CalendarItemBase calendarItemBase, bool sendResponse)
 {
     ExTraceGlobals.CalendarTracer.TraceDebug(0L, "Process meeting response without editing");
     calendarItemBase.LocationIdentifierHelperInstance.SetLocationIdentifier(42143U, LastChangeAction.RespondToMeetingRequest);
     using (MeetingResponse meetingResponse = MeetingUtilities.CreateMeetingResponse(responseType, calendarItemBase, sendResponse))
     {
         if (sendResponse)
         {
             meetingResponse.Send();
         }
     }
     MeetingUtilities.ProcessCalendarItemAfterResponse(responseType, calendarItemBase, sendResponse);
 }
コード例 #10
0
 private void OnPromotedMessageHandler(StoreDriverEventSource source, StoreDriverDeliveryEventArgs args)
 {
     if (StoreDriverConfig.Instance.IsAutoAcceptForGroupAndSelfForwardedEventEnabled)
     {
         StoreDriverDeliveryEventArgsImpl storeDriverDeliveryEventArgsImpl = (StoreDriverDeliveryEventArgsImpl)args;
         if ((ObjectClass.IsMeetingRequest(storeDriverDeliveryEventArgsImpl.MessageClass) || ObjectClass.IsMeetingResponse(storeDriverDeliveryEventArgsImpl.MessageClass)) && !this.IsEHAMigrationMeetingMessage(storeDriverDeliveryEventArgsImpl.MailItem))
         {
             MailboxSession mailboxSession = storeDriverDeliveryEventArgsImpl.MailboxSession;
             if (mailboxSession == null || storeDriverDeliveryEventArgsImpl.ReplayItem == null)
             {
                 MeetingMessageProcessingAgent.tracer.TraceError((long)this.GetHashCode(), "MeetingMessageProcessingAgent::OnPromotedMessageHandler() MailboxSession or StoreDriverDeliveryEventArgsImpl.ReplayItem is null");
                 return;
             }
             if (ObjectClass.IsMeetingRequest(storeDriverDeliveryEventArgsImpl.MessageClass) && !mailboxSession.IsGroupMailbox())
             {
                 MeetingRequest meetingRequest = null;
                 try
                 {
                     meetingRequest = (Item.ConvertFrom(storeDriverDeliveryEventArgsImpl.ReplayItem, mailboxSession) as MeetingRequest);
                     if (meetingRequest != null && MeetingMessageProcessing.IsSentToSelf(meetingRequest, mailboxSession))
                     {
                         MeetingMessageProcessingAgent.tracer.TraceDebug <string, IExchangePrincipal>((long)this.GetHashCode(), "Attempting to deliver self forwarded message {0} to mailbox {1} to Deleted Items", meetingRequest.InternetMessageId, mailboxSession.MailboxOwner);
                         this.DeliverToDeletedItems(mailboxSession, meetingRequest, storeDriverDeliveryEventArgsImpl);
                     }
                 }
                 finally
                 {
                     if (meetingRequest != null)
                     {
                         Item.SafeDisposeConvertedItem(storeDriverDeliveryEventArgsImpl.ReplayItem, meetingRequest);
                     }
                 }
             }
             if (ObjectClass.IsMeetingResponse(storeDriverDeliveryEventArgsImpl.MessageClass) && mailboxSession.IsGroupMailbox())
             {
                 MeetingResponse meetingResponse = Item.ConvertFrom(storeDriverDeliveryEventArgsImpl.ReplayItem, mailboxSession) as MeetingResponse;
                 if (meetingResponse != null && meetingResponse.IsSilent)
                 {
                     ADRecipient adrecipient = null;
                     if (meetingResponse.From.TryGetADRecipient(mailboxSession.GetADRecipientSession(true, ConsistencyMode.IgnoreInvalid), out adrecipient) && adrecipient != null && adrecipient.RecipientDisplayType != RecipientDisplayType.ConferenceRoomMailbox && adrecipient.RecipientDisplayType != RecipientDisplayType.SyncedConferenceRoomMailbox && adrecipient.RecipientDisplayType != RecipientDisplayType.EquipmentMailbox && adrecipient.RecipientDisplayType != RecipientDisplayType.SyncedEquipmentMailbox && !meetingResponse.IsCounterProposal)
                     {
                         MeetingMessageProcessingAgent.tracer.TraceDebug <string, IExchangePrincipal>((long)this.GetHashCode(), "Attempting to deliver empty response {0} to mailbox {1} to Deleted Items", meetingResponse.InternetMessageId, mailboxSession.MailboxOwner);
                         this.DeliverToDeletedItems(mailboxSession, meetingResponse, storeDriverDeliveryEventArgsImpl);
                     }
                 }
             }
         }
     }
 }
コード例 #11
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);
     }
 }
コード例 #12
0
        // Token: 0x0600281A RID: 10266 RVA: 0x000E3098 File Offset: 0x000E1298
        private void InitializeMeetingResponse()
        {
            MeetingResponse meetingResponse = (MeetingResponse)base.Item;

            this.responseType = meetingResponse.ResponseType;
            string queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "mid", false);

            if (queryStringParameter != null)
            {
                this.meetingRequestId = OwaStoreObjectId.CreateFromString(queryStringParameter);
            }
            this.isMeetingInviteInDeleteItems = (Utilities.GetQueryStringParameter(base.Request, "d", false) != null);
            this.infobar.AddMessage(SanitizedHtmlString.FromStringId(-1981719796), InfobarMessageType.Informational);
            string format = string.Empty;

            switch (this.responseType)
            {
            case ResponseType.Tentative:
                format = LocalizedStrings.GetHtmlEncoded(-588720585);
                break;

            case ResponseType.Accept:
                format = LocalizedStrings.GetHtmlEncoded(-14610226);
                break;

            case ResponseType.Decline:
                format = LocalizedStrings.GetHtmlEncoded(-1615218790);
                break;
            }
            SanitizedHtmlString messageHtml;

            if (this.isSendOnBehalfOf)
            {
                messageHtml = SanitizedHtmlString.Format(format, new object[]
                {
                    meetingResponse.From.DisplayName
                });
            }
            else
            {
                messageHtml = SanitizedHtmlString.Format(format, new object[]
                {
                    LocalizedStrings.GetNonEncoded(372029413)
                });
            }
            this.infobar.AddMessage(messageHtml, InfobarMessageType.Informational);
        }
コード例 #13
0
        public MeetingResponseWriter(MeetingResponse meetingResponse, UserContext userContext, bool isPreviewForm, bool isInDeletedItems, bool isEmbeddedItem, bool isInJunkEmailFolder, bool isSuspectedPhishingItem, bool isLinkEnabled) : base(meetingResponse, userContext, isPreviewForm, isInDeletedItems, isEmbeddedItem, isInJunkEmailFolder, isSuspectedPhishingItem, isLinkEnabled)
        {
            this.meetingResponse = meetingResponse;
            this.isEmbeddedItem  = isEmbeddedItem;
            object obj = meetingResponse.TryGetProperty(MessageItemSchema.IsDraft);

            this.isDraft     = (obj is bool && (bool)obj);
            this.isDelegated = meetingResponse.IsDelegated();
            if (!Utilities.IsPublic(meetingResponse) && !this.isDraft && !isEmbeddedItem)
            {
                this.isOrganizer = base.ProcessMeetingMessage(meetingResponse, Utilities.IsItemInDefaultFolder(meetingResponse, DefaultFolderType.Inbox));
                if (this.isOrganizer)
                {
                    this.AttendeeResponseWell = new CalendarItemAttendeeResponseRecipientWell(this.CalendarItemBase);
                }
            }
            this.recipientWell = new MessageRecipientWell(meetingResponse);
        }
コード例 #14
0
 // Token: 0x06002DBB RID: 11707 RVA: 0x001030F8 File Offset: 0x001012F8
 private void EditResponseInternal(ResponseType responseType, CalendarItemBase calendarItemBase, bool doCalendarItemUpdate)
 {
     ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingInviteEventHandler.EditResponseInternal");
     MeetingUtilities.ThrowIfMeetingResponseInvalid(calendarItemBase);
     if (doCalendarItemUpdate)
     {
         this.UpdateItem(calendarItemBase);
         Utilities.SaveItem(calendarItemBase);
         calendarItemBase.Load();
     }
     using (MeetingResponse meetingResponse = MeetingUtilities.EditResponse(responseType, calendarItemBase))
     {
         meetingResponse.Load();
         this.Writer.Write("<div id=divOp _sOp=mr>");
         this.Writer.Write(OwaStoreObjectId.CreateFromStoreObject(meetingResponse).ToBase64String());
         this.Writer.Write("</div>");
     }
 }
コード例 #15
0
        public async Task SaveAsyncWhenMeetingsReturnsSuccess()
        {
            //
            var     mockMeetingRepository = GetDefaultIMeetingRepositoryInstance();
            var     mockIUnitOfWork       = GetDefaultIUnitOfWorkInstance();
            Meeting meeting = new Meeting();

            mockMeetingRepository.Setup(r => r.AddAsync(meeting))
            .Returns(Task.FromResult <Meeting>(meeting));
            var service = new MeetingService(mockMeetingRepository.Object, mockIUnitOfWork.Object);
            //
            MeetingResponse result = await service.SaveAsync(meeting);

            var message = result.Message;

            //
            message.Should().Be("");
        }
コード例 #16
0
        public async Task GetAllAsyncWhenNoMeetingsReturnsEmptyCollection()
        {
            //Arrange
            var mockMeetingRepository = GetDefaultIMeetingRepositoryInstance();
            var mockUnitOfWork        = GetDefaultIUnitOfWorkInstance();
            var meetingId             = 200;

            mockMeetingRepository.Setup(r => r.FindById(meetingId))
            .Returns(Task.FromResult <Meeting>(null));

            var service = new MeetingService(mockMeetingRepository.Object, mockUnitOfWork.Object);
            //Act
            MeetingResponse result = await service.GetByIdAsync(meetingId);

            var message = result.Message;

            //Assert
            message.Should().Be("Meeting not found");
        }
コード例 #17
0
        public void SaveEditResponse()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingResponseEventHandler.SaveEditResponse");
            MeetingResponse meetingResponse = base.GetRequestItem <MeetingResponse>(new PropertyDefinition[0]);

            try
            {
                base.UpdateMessage(meetingResponse, StoreObjectType.MeetingMessage);
                this.HandleSendOnBehalf(meetingResponse);
                base.SaveHideMailTipsByDefault();
                Utilities.SaveItem(meetingResponse);
                meetingResponse.Load();
                base.WriteChangeKey(meetingResponse);
            }
            finally
            {
                meetingResponse.Dispose();
                meetingResponse = null;
            }
        }
コード例 #18
0
        public virtual void RespondToEvent(StoreId id, RespondToEventParameters parameters, Event updateToEvent = null)
        {
            if (parameters == null)
            {
                throw new InvalidRequestException(CalendaringStrings.ErrorMissingRequiredRespondParameter);
            }
            MeetingResponse meetingResponse = null;

            try
            {
                try
                {
                    using (ICalendarItemBase calendarItemBase = this.Bind(id))
                    {
                        calendarItemBase.OpenAsReadWrite();
                        if (updateToEvent != null)
                        {
                            EventTranslator.Instance.SetPropertiesFromEntityOnStorageObject(updateToEvent, calendarItemBase);
                        }
                        meetingResponse = calendarItemBase.RespondToMeetingRequest(default(ResponseTypeConverter).Convert(parameters.Response), true, true, parameters.ProposedStartTime, parameters.ProposedEndTime);
                    }
                }
                catch (ObjectNotFoundException innerException)
                {
                    throw new AccessDeniedException(Strings.ErrorAccessDenied, innerException);
                }
                if (parameters.SendResponse)
                {
                    EventWorkflowParametersTranslator <RespondToEventParameters, RespondToEventParametersSchema> .Instance.SetPropertiesFromEntityOnStorageObject(parameters, meetingResponse);

                    MeetingMessage.SendLocalOrRemote(meetingResponse, true, true);
                }
            }
            finally
            {
                if (meetingResponse != null)
                {
                    meetingResponse.Dispose();
                }
            }
        }
コード例 #19
0
        private static MeetingResponse CreateMeetingResponse(ResponseType responseType, CalendarItemBase calendarItemBase, bool intendToSendResponse)
        {
            MeetingResponse meetingResponse = null;

            try
            {
                meetingResponse = calendarItemBase.RespondToMeetingRequest(responseType, true, intendToSendResponse, null, null);
                calendarItemBase.Load();
                if (Globals.ArePerfCountersEnabled)
                {
                    OwaSingleCounters.ItemsCreated.Increment();
                }
                MeetingUtilities.UpdateMeetingResponseSubject(meetingResponse);
            }
            catch (SaveConflictException ex)
            {
                ExTraceGlobals.CalendarTracer.TraceDebug <string>(0L, "Exception on RespondToMeetingRequest: {0}'", ex.Message);
                throw;
            }
            return(meetingResponse);
        }
コード例 #20
0
        private void InitializeMeetingResponse()
        {
            MeetingResponse meetingResponse = (MeetingResponse)base.Item;
            ResponseType    responseType    = meetingResponse.ResponseType;

            Strings.IDs stringId = -1018465893;
            switch (responseType)
            {
            case ResponseType.Tentative:
                stringId = -1248725275;
                break;

            case ResponseType.Accept:
                stringId = 1515395588;
                break;

            case ResponseType.Decline:
                stringId = -1707599932;
                break;
            }
            base.Infobar.AddMessageLocalized(stringId, InfobarMessageType.Informational);
        }
コード例 #21
0
        public void SaveMeetingResponse()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingInviteEventHandler.SaveMeetingResponse");
            MeetingResponse meetingResponse = null;

            try
            {
                meetingResponse = base.GetRequestItem <MeetingResponse>(new PropertyDefinition[0]);
                meetingResponse[ItemSchema.Subject] = (string)base.GetParameter("Subj");
                Utilities.SaveItem(meetingResponse);
                meetingResponse.Load();
                this.Writer.Write("<div id=ck>");
                this.Writer.Write(meetingResponse.Id.ChangeKeyAsBase64String());
                this.Writer.Write("</div>");
            }
            finally
            {
                if (meetingResponse != null)
                {
                    meetingResponse.Dispose();
                    meetingResponse = null;
                }
            }
        }
コード例 #22
0
 // Token: 0x0600079D RID: 1949 RVA: 0x00036558 File Offset: 0x00034758
 private void ProcessMeetingResponse(MailboxSession itemStore, MeetingResponse mtgMessage, ref CalendarItemBase originalCalItem, string internetMessageId)
 {
     try
     {
         if (!mtgMessage.IsRepairUpdateMessage && originalCalItem != null && !originalCalItem.ResponseRequested)
         {
             CalendarProcessing.ProcessingResponseTracer.TraceDebug <object, string>((long)mtgMessage.GetHashCode(), "{0}: Skipping processing the MeetingResponse since the organizer has not requested a response: {1}", TraceContext.Get(), internetMessageId);
             CalendarProcessingSteps calendarProcessingSteps = CalendarProcessingSteps.PropsCheck | CalendarProcessingSteps.LookedForOutOfDate | CalendarProcessingSteps.UpdatedCalItem;
             mtgMessage.SetCalendarProcessingSteps(calendarProcessingSteps);
         }
         else if (mtgMessage.TryUpdateCalendarItem(ref originalCalItem, false))
         {
             mtgMessage.Load();
             try
             {
                 itemStore.COWSettings.TemporaryDisableHold = true;
                 ConflictResolutionResult conflictResolutionResult = originalCalItem.Save(SaveMode.ResolveConflicts);
                 originalCalItem.Load();
                 if (conflictResolutionResult.SaveStatus == SaveResult.IrresolvableConflict)
                 {
                     throw new SaveConflictException(ServerStrings.ExSaveFailedBecauseOfConflicts(originalCalItem.Id), conflictResolutionResult);
                 }
             }
             finally
             {
                 itemStore.COWSettings.TemporaryDisableHold = false;
             }
         }
         CalendarAssistantPerformanceCounters.MeetingResponses.Increment();
         CalendarProcessing.TracerPfd.TracePfd <int, object, string>((long)mtgMessage.GetHashCode(), "PFD IWC {0} {1}:completed Processing Meeting Response for {2}", 20631, TraceContext.Get(), internetMessageId);
     }
     catch (ObjectNotFoundException innerException)
     {
         throw new TransientException(Strings.descTransientErrorInResponse, innerException);
     }
 }
コード例 #23
0
        public PreFormActionResponse Execute(OwaContext owaContext, out ApplicationElement applicationElement, out string type, out string state, out string action)
        {
            if (owaContext == null)
            {
                throw new ArgumentNullException("owaContext");
            }
            applicationElement = ApplicationElement.Item;
            type   = string.Empty;
            action = string.Empty;
            state  = string.Empty;
            HttpContext httpContext = owaContext.HttpContext;
            HttpRequest request     = httpContext.Request;
            UserContext userContext = owaContext.UserContext;

            if (!Utilities.IsPostRequest(request))
            {
                return(userContext.LastClientViewState.ToPreFormActionResponse());
            }
            string      formParameter  = Utilities.GetFormParameter(request, "hidid", true);
            string      formParameter2 = Utilities.GetFormParameter(request, "hidchk", true);
            string      formParameter3 = Utilities.GetFormParameter(request, "hidcmdpst", true);
            MessageItem messageItem    = null;

            try
            {
                if (string.CompareOrdinal(formParameter3, "cls") != 0 && Utilities.IsPostRequest(request))
                {
                    if (ObjectClass.IsMeetingRequest(owaContext.FormsRegistryContext.Type))
                    {
                        messageItem = Utilities.GetItem <MeetingRequest>(userContext, formParameter, formParameter2, new PropertyDefinition[0]);
                    }
                    else if (ObjectClass.IsMeetingCancellation(owaContext.FormsRegistryContext.Type))
                    {
                        messageItem = Utilities.GetItem <MeetingCancellation>(userContext, formParameter, formParameter2, new PropertyDefinition[0]);
                    }
                    else
                    {
                        if (!ObjectClass.IsMeetingResponse(owaContext.FormsRegistryContext.Type))
                        {
                            throw new OwaInvalidRequestException("Invalid Type");
                        }
                        messageItem = Utilities.GetItem <MeetingResponse>(userContext, formParameter, formParameter2, new PropertyDefinition[0]);
                    }
                    this.base64ItemId = messageItem.Id.ObjectId.ToBase64String();
                }
                string text = null;
                string a;
                if ((a = formParameter3) != null)
                {
                    if (!(a == "snd"))
                    {
                        if (a == "cls")
                        {
                            return(userContext.LastClientViewState.ToPreFormActionResponse());
                        }
                        if (!(a == "attch"))
                        {
                            if (!(a == "addrBook"))
                            {
                                if (a == "viewRcptWhenEdt")
                                {
                                    EditMessageHelper.UpdateMessage(messageItem, userContext, request, out text);
                                    if (!string.IsNullOrEmpty(text))
                                    {
                                        return(this.RedirectToCompose(owaContext, text));
                                    }
                                    return(EditMessageHelper.RedirectToRecipient(owaContext, messageItem, AddressBook.Mode.EditMeetingResponse));
                                }
                            }
                            else
                            {
                                EditMessageHelper.UpdateMessage(messageItem, userContext, request, out text);
                                if (!string.IsNullOrEmpty(text))
                                {
                                    return(this.RedirectToCompose(owaContext, text));
                                }
                                return(EditMessageHelper.RedirectToPeoplePicker(owaContext, messageItem, AddressBook.Mode.EditMeetingResponse));
                            }
                        }
                        else
                        {
                            EditMessageHelper.UpdateMessage(messageItem, userContext, request, out text);
                            if (!string.IsNullOrEmpty(text))
                            {
                                return(this.RedirectToCompose(owaContext, text));
                            }
                            return(this.RedirectToAttachmentManager(owaContext));
                        }
                    }
                    else
                    {
                        StoreObjectId   storeObjectId   = null;
                        MeetingResponse meetingResponse = messageItem as MeetingResponse;
                        if (meetingResponse != null)
                        {
                            storeObjectId = meetingResponse.AssociatedMeetingRequestId;
                        }
                        bool flag = EditMessageHelper.UpdateMessage(messageItem, userContext, request, out text);
                        if (!string.IsNullOrEmpty(text))
                        {
                            return(this.RedirectToCompose(owaContext, text));
                        }
                        if (!flag && Utilities.GetFormParameter(request, "hidunrslrcp", false) == "1")
                        {
                            flag = true;
                        }
                        if (flag)
                        {
                            return(this.RedirectToCompose(owaContext, LocalizedStrings.GetNonEncoded(-2019438132)));
                        }
                        text = EditMessageHelper.SendMessage(userContext, messageItem);
                        if (text != null)
                        {
                            return(this.RedirectToCompose(owaContext, text));
                        }
                        if (storeObjectId != null)
                        {
                            StoreObjectId storeObjectId2 = null;
                            using (MeetingRequest item = Utilities.GetItem <MeetingRequest>(userContext, storeObjectId, new PropertyDefinition[0]))
                            {
                                storeObjectId2 = item.ParentId;
                            }
                            if (storeObjectId2 != null)
                            {
                                if (Utilities.IsDefaultFolderId(userContext.MailboxSession, storeObjectId2, DefaultFolderType.DeletedItems))
                                {
                                    Utilities.DeleteItems(userContext, DeleteItemFlags.SoftDelete, new StoreId[]
                                    {
                                        storeObjectId
                                    });
                                }
                                else
                                {
                                    Utilities.DeleteItems(userContext, DeleteItemFlags.MoveToDeletedItems, new StoreId[]
                                    {
                                        storeObjectId
                                    });
                                }
                            }
                        }
                        userContext.ForceNewSearch = true;
                        return(userContext.LastClientViewState.ToPreFormActionResponse());
                    }
                }
                throw new OwaInvalidRequestException("Invalid command form parameter");
            }
            finally
            {
                if (messageItem != null)
                {
                    messageItem.Dispose();
                }
            }
            PreFormActionResponse result;

            return(result);
        }
コード例 #24
0
 // Token: 0x060007B7 RID: 1975 RVA: 0x00037A84 File Offset: 0x00035C84
 private void HandleResponsesWithSameSequenceNumber(MailboxSession itemStore, MeetingMessage item, VersionedId iid, object[] rowProperties, string sentRepresenting, ref OldMessageDeletion.LatestItemInfo latestInfo, List <VersionedId> itemsToDelete, ref bool hasAttachments, ref bool hasBody)
 {
     if (!this.SentRepresentingMatches(sentRepresenting, rowProperties[5]))
     {
         return;
     }
     if (rowProperties[6] is PropertyError || !(rowProperties[6] is ExDateTime))
     {
         return;
     }
     if (rowProperties[7] is PropertyError || !(rowProperties[7] is bool) || (bool)rowProperties[7])
     {
         return;
     }
     try
     {
         using (MeetingResponse meetingResponse = MeetingResponse.Bind(item.Session, iid))
         {
             if (meetingResponse.Body.Size > 0L)
             {
                 return;
             }
         }
     }
     catch (VirusDetectedException e)
     {
         OldMessageDeletion.Tracer.TraceError <object, VersionedId>((long)this.GetHashCode(), "{0}: A virus was detected in the CalendarItem associated with this message {1}. This message will be skipped.", TraceContext.Get(), iid);
         CalendarAssistantLog.LogEntry(itemStore, e, false, "A virus was detected in the CalendarItem associated with this message {0}. This message will be skipped.", new object[]
         {
             iid
         });
         return;
     }
     catch (VirusMessageDeletedException e2)
     {
         OldMessageDeletion.Tracer.TraceError <object, VersionedId>((long)this.GetHashCode(), "{0}: A virus was detected in the CalendarItem associated with this message and was deleted {1}. This message will be skipped.", TraceContext.Get(), iid);
         CalendarAssistantLog.LogEntry(itemStore, e2, false, "A virus was detected in the CalendarItem associated with this message and was deleted {0}. This message will be skipped.", new object[]
         {
             iid
         });
         return;
     }
     catch (StoragePermanentException ex)
     {
         OldMessageDeletion.Tracer.TraceError <object, StoragePermanentException>((long)this.GetHashCode(), "{0}: Exception caught when opening response and getting the body: {1}", TraceContext.Get(), ex);
         CalendarAssistantLog.LogEntry(itemStore, ex, false, "Exception caught when opening response and getting the body for message id {0}", new object[]
         {
             iid
         });
         return;
     }
     catch (StorageTransientException ex2)
     {
         OldMessageDeletion.Tracer.TraceError <object, StorageTransientException>((long)this.GetHashCode(), "{0}: Exception caught when opening response and getting the body: {1}", TraceContext.Get(), ex2);
         CalendarAssistantLog.LogEntry(itemStore, ex2, false, "Exception caught when opening response and getting the body for message id {0}", new object[]
         {
             iid
         });
         return;
     }
     if (latestInfo.LatestClientSubmitTime < (ExDateTime)rowProperties[6])
     {
         if (!hasAttachments && !hasBody)
         {
             itemsToDelete.Add(latestInfo.LatestItemId);
             latestInfo.LatestItemId           = iid;
             latestInfo.LatestClientSubmitTime = (ExDateTime)rowProperties[6];
             hasAttachments = false;
             hasBody        = false;
             return;
         }
     }
     else
     {
         itemsToDelete.Add(iid);
     }
 }
コード例 #25
0
        /// <summary>
        /// Reply to a meeting request. You can either reply to a meeting request received in your Inbox or
        /// you can reply to the appointment in your calendar if the calendar item is automatically created
        /// in your calendar folder. This sample identifies the different options for replying
        /// to a meeting request.
        /// </summary>
        /// <param name="service">An ExchangeService object with credentials and the EWS URL.</param>
        private static void RespondToMeetingInvite(ExchangeService service)
        {
            // Specify a view that returns a single item.
            ItemView view = new ItemView(1);

            bool replyToMeetingRequest = true; // Indicates whether you will act on the meeting request or the calendar item.
            bool sendResponse          = true;
            //bool tentative = true;
            //bool replyAll = true;

            string querystringMeetingRequest = "Subject:'Status update - planning meeting' Kind:meetings";
            string querystringAppointment    = "Subject:'Status update - planning meeting'";

            if (replyToMeetingRequest)
            {
                // Find the first meeting request in the Inbox with 'Status update - planning meeting' set for the subject property.
                // This results in a FindItem operation call to EWS.
                FindItemsResults <Item> results = service.FindItems(WellKnownFolderName.Inbox, querystringMeetingRequest, view);

                if (results.TotalCount > 0)
                {
                    if (results.Items[0] is MeetingRequest)
                    {
                        MeetingRequest request = results.Items[0] as MeetingRequest;

                        // Accept the meeting invitation. This results in a CreateItem operation call to EWS
                        // with the AcceptItem response object. If the Exchange server created a tentatively
                        // accepted calendar item for this request, Exchange will change the response value for the
                        // calendar item to accepted. Exchange will move the meeting request to the Deleted Items
                        // folder.
                        CalendarActionResults responseResults = request.Accept(sendResponse);

                        // The following are other options for responding to meeting requests:
                        // CalendarActionResults responseResults = request.AcceptTentatively(sendResponse);
                        // CalendarActionResults responseResults = request.Decline(sendResponse);

                        // The following options for responding to meeting requests create a local copy of the meeting response
                        // so that you can set properties on the response before sending the meeting response message
                        // to the organizer:
                        // CalendarActionResults responseResults = request.CreateAcceptMessage(tentative);
                        // CalendarActionResults responseResults = request.CreateDeclineMessage();

                        // The following options for acting on a meeting request change the item class of the response to an
                        // email message. This allows you to send an email response that does not affect the calendar workflow.
                        // You can update the ResponseMessage object properties and then use the ResponseMessage.Send
                        // method to send the email response.
                        // ResponseMessage response = request.CreateForward();
                        // ResponseMessage response = request.CreateReply(replyAll); // Creates a reply email message to all attendees.

                        // Get the appointment that was created in response to the accepted meeting request.
                        Appointment myAppointment = responseResults.Appointment;

                        // Gets the meeting request that was moved to the Deleted Items folder after the meeting request was
                        // used to make a response to the organizer. If the meeting request was responded to from
                        // the Deleted Items folder, the value of responseResults.MeetingRequest will be null.
                        if (responseResults.MeetingRequest != null)
                        {
                            MeetingRequest deletedRequest = responseResults.MeetingRequest;
                        }
                        // Gets a copy of the response sent to the organizer. If the attendee chose not to send a
                        // response, the value of responseResults.MeetingResponse will be null.
                        if (responseResults.MeetingResponse != null)
                        {
                            MeetingResponse meetingReponse = responseResults.MeetingResponse;
                        }
                        // Gets a copy of the meeting cancellation if the organizer canceled the meeting. This will
                        // be null if the organizer has not canceled the meeting.
                        if (responseResults.MeetingCancellation != null)
                        {
                            MeetingCancellation meetingCancel = responseResults.MeetingCancellation;
                        }
                    }
                }
            }
            else // Find the automatically created calendar item in your calendar.
            {
                // Find the first appointment in the calendar with 'Status update - planning meeting' set for the subject property.
                // This results in a FindItem operation call to EWS.
                FindItemsResults <Item> results = service.FindItems(WellKnownFolderName.Calendar, querystringAppointment, view);

                if (results.TotalCount > 0)
                {
                    if (results.Items[0] is Appointment)
                    {
                        Appointment appointment = results.Items[0] as Appointment;

                        // Accept the calendar item. This results in a CreateItem operation call to EWS
                        // with the AcceptItem response object. Exchange will move the meeting
                        // request to the Deleted Items folder.
                        CalendarActionResults responseResults = appointment.Accept(sendResponse);

                        // The following are other options for responding to the meeting organizer:
                        // CalendarActionResults responseResults = appointment.AcceptTentatively(sendResponse);
                        // CalendarActionResults responseResults = appointment.Decline(sendResponse);
                        // CalendarActionResults responseResults = appointment.CreateAcceptMessage(tentative);
                        // CalendarActionResults responseResults = appointment.CreateDeclineMessage();
                        // appointment.Delete(DeleteMode.MoveToDeletedItems); // No response is sent to the organizer.
                        // ResponseMessage response = appointment.CreateForward();
                        // ResponseMessage response = appointment.CreateReply(replyAll);

                        // Gets the meeting request from the Deleted Items folder if it is present.
                        if (responseResults.MeetingRequest != null)
                        {
                            MeetingRequest deletedRequest = responseResults.MeetingRequest;
                        }
                        // Gets a copy of the response sent to the organizer. If the attendee chose not to send a
                        // response, the value of responseResults.MeetingResponse will be null.
                        if (responseResults.MeetingResponse != null)
                        {
                            MeetingResponse meetingReponse = responseResults.MeetingResponse;
                        }
                        // Gets a copy of the meeting cancellation if the organizer canceled the meeting. This will
                        // be null if the organizer has not canceled the meeting.
                        if (responseResults.MeetingCancellation != null)
                        {
                            MeetingCancellation meetingCancel = responseResults.MeetingCancellation;
                        }
                    }
                }
            }
        }
コード例 #26
0
        // Token: 0x06000575 RID: 1397 RVA: 0x0002B488 File Offset: 0x00029688
        private void MeetingPageWriterFactory(string itemType, EventArgs e)
        {
            if (ObjectClass.IsMeetingRequest(itemType))
            {
                MeetingRequest meetingRequest = base.Item = base.Initialize <MeetingRequest>(MeetingInviteWriter.PrefetchProperties);
                this.delegateMessage   = 1491510515;
                this.meetingPageWriter = new MeetingInviteWriter(meetingRequest, base.UserContext, base.IsEmbeddedItem);
                if (meetingRequest.MeetingRequestType == MeetingMessageType.Outdated)
                {
                    base.Infobar.AddMessageLocalized(1771878760, InfobarMessageType.Informational);
                }
                else if (this.meetingPageWriter.CalendarItemBase != null)
                {
                    CalendarUtilities.AddCalendarInfobarMessages(base.Infobar, this.meetingPageWriter.CalendarItemBase, meetingRequest, base.UserContext);
                }
            }
            else if (ObjectClass.IsMeetingCancellation(itemType))
            {
                MeetingCancellation meetingCancellation = base.Item = base.Initialize <MeetingCancellation>(MeetingCancelWriter.PrefetchProperties);
                this.delegateMessage   = 1953915685;
                this.meetingPageWriter = new MeetingCancelWriter(meetingCancellation, base.UserContext, base.IsEmbeddedItem);
                if (MeetingUtilities.MeetingCancellationIsOutOfDate(meetingCancellation))
                {
                    base.Infobar.AddMessageLocalized(21101307, InfobarMessageType.Informational);
                }
                else
                {
                    base.Infobar.AddMessageLocalized(-161808760, InfobarMessageType.Informational);
                }
            }
            else if (ObjectClass.IsCalendarItemCalendarItemOccurrenceOrRecurrenceException(itemType))
            {
                this.isCalendarItem = true;
                CalendarItemBase calendarItemBase = base.Item = base.Initialize <CalendarItemBase>(MeetingPageWriter.CalendarPrefetchProperties);
                this.meetingPageWriter = new CalendarItemWriter(calendarItemBase, base.UserContext);
                if (calendarItemBase != null)
                {
                    CalendarUtilities.AddCalendarInfobarMessages(base.Infobar, this.meetingPageWriter.CalendarItemBase, null, base.UserContext);
                }
            }
            else
            {
                if (!ObjectClass.IsMeetingResponse(itemType))
                {
                    ExTraceGlobals.CalendarCallTracer.TraceDebug <string>((long)this.GetHashCode(), "Unsupported item type '{0}' for meeting page", itemType);
                    throw new OwaInvalidRequestException(string.Format("Unsupported item type '{0}' for edit meeting page", itemType));
                }
                this.isMeetingResponse = true;
                MeetingResponse meetingResponse = base.Item = base.Initialize <MeetingResponse>(MeetingResponseWriter.PrefetchProperties);
                this.delegateMessage   = -1986433227;
                this.meetingPageWriter = new MeetingResponseWriter(meetingResponse, base.UserContext, base.IsEmbeddedItem);
                if (meetingResponse.From != null)
                {
                    string messageText = string.Empty;
                    switch (meetingResponse.ResponseType)
                    {
                    case ResponseType.Tentative:
                        messageText = string.Format(LocalizedStrings.GetNonEncoded(-67265594), meetingResponse.From.DisplayName);
                        break;

                    case ResponseType.Accept:
                        messageText = string.Format(LocalizedStrings.GetNonEncoded(1335319405), meetingResponse.From.DisplayName);
                        break;

                    case ResponseType.Decline:
                        messageText = string.Format(LocalizedStrings.GetNonEncoded(-1091863618), meetingResponse.From.DisplayName);
                        break;
                    }
                    base.Infobar.AddMessageText(messageText, InfobarMessageType.Informational);
                }
            }
            if (!this.isCalendarItem)
            {
                this.isDelegated = ((MeetingMessage)base.Item).IsDelegated();
            }
            this.CurrentFolderStoreObjectId = (base.IsEmbeddedItem ? base.ParentItem.ParentId : base.Item.ParentId);
            this.navigationModule           = Navigation.GetNavigationModuleFromFolder(base.UserContext, this.CurrentFolderStoreObjectId);
        }
コード例 #27
0
 // Token: 0x06002917 RID: 10519 RVA: 0x000E8944 File Offset: 0x000E6B44
 protected virtual void MeetingPageWriterFactory(string itemType, EventArgs e)
 {
     if (ObjectClass.IsMeetingRequest(itemType))
     {
         this.meetingPageWriter = new MeetingInviteWriter(base.Item = base.Initialize <MeetingRequest>(MeetingPageWriter.MeetingMessagePrefetchProperties), base.UserContext, null, base.IsPreviewForm, base.IsInDeleteItems, base.IsEmbeddedItem, this.isInJunkEmailFolder, this.isSuspectedPhishingItem, this.itemLinkEnabled);
         if (!this.IsDraft)
         {
             this.shouldRenderToolbar = true;
             if (!base.IsEmbeddedItem && this.IsOwnerMailboxSession && (this.IsItemFromOtherMailbox || this.IsDelegated || Utilities.IsItemInExternalSharedInFolder(base.UserContext, base.Item)))
             {
                 this.GetPrincipalCalendarFolderId();
             }
         }
     }
     else if (ObjectClass.IsMeetingCancellation(itemType))
     {
         this.meetingPageWriter = new MeetingCancelWriter(base.Item = base.Initialize <MeetingCancellation>(MeetingPageWriter.MeetingMessagePrefetchProperties), base.UserContext, null, base.IsPreviewForm, base.IsInDeleteItems, base.IsEmbeddedItem, this.isInJunkEmailFolder, this.isSuspectedPhishingItem, this.itemLinkEnabled);
         if (!this.IsDraft)
         {
             this.shouldRenderToolbar = true;
             if (!base.IsEmbeddedItem && this.IsOwnerMailboxSession && (this.IsItemFromOtherMailbox || this.IsDelegated || Utilities.IsItemInExternalSharedInFolder(base.UserContext, base.Item)))
             {
                 this.GetPrincipalCalendarFolderId();
             }
         }
     }
     else if (ObjectClass.IsCalendarItemCalendarItemOccurrenceOrRecurrenceException(itemType))
     {
         CalendarItemBase calendarItemBase = base.Item = base.Initialize <CalendarItemBase>(MeetingPageWriter.CalendarPrefetchProperties);
         this.isCalendarItem      = true;
         this.isMeeting           = calendarItemBase.IsMeeting;
         this.meetingPageWriter   = new CalendarItemWriter(calendarItemBase, base.UserContext, base.IsPreviewForm, base.IsInDeleteItems, base.IsEmbeddedItem, this.isInJunkEmailFolder, this.isSuspectedPhishingItem, this.itemLinkEnabled);
         this.shouldRenderToolbar = true;
         if (!base.IsEmbeddedItem && this.IsOwnerMailboxSession && (this.IsItemFromOtherMailbox || Utilities.IsItemInExternalSharedInFolder(base.UserContext, base.Item)))
         {
             this.GetPrincipalCalendarFolderId();
         }
     }
     else
     {
         if (!ObjectClass.IsMeetingResponse(itemType))
         {
             ExTraceGlobals.CalendarDataTracer.TraceDebug <string>((long)this.GetHashCode(), "Unsupported item type '{0}' for meeting page", itemType);
             throw new OwaInvalidRequestException(string.Format("Unsupported item type '{0}' for edit meeting page", itemType));
         }
         MeetingResponse meetingResponse = base.Item = base.Initialize <MeetingResponse>(MeetingPageWriter.MeetingMessagePrefetchProperties);
         this.meetingPageWriter = new MeetingResponseWriter(meetingResponse, base.UserContext, base.IsPreviewForm, base.IsInDeleteItems, base.IsEmbeddedItem, this.isInJunkEmailFolder, this.isSuspectedPhishingItem, this.itemLinkEnabled);
         if (meetingResponse.From != null && this.IsDraft)
         {
             this.shouldRenderSendOnBehalf = (string.CompareOrdinal(base.UserContext.ExchangePrincipal.LegacyDn, meetingResponse.From.EmailAddress) != 0);
         }
         this.shouldRenderToolbar = true;
     }
     if (this.MeetingPageWriter.ShouldRenderReminder && this.MeetingPageWriter.CalendarItemBase != null)
     {
         this.disableOccurrenceReminderUI = MeetingUtilities.CheckShouldDisableOccurrenceReminderUI(this.MeetingPageWriter.CalendarItemBase);
         if (this.disableOccurrenceReminderUI && !this.IsPublicItem)
         {
             this.MeetingPageWriter.FormInfobar.AddMessage(SanitizedHtmlString.FromStringId(-891369593), InfobarMessageType.Informational);
         }
     }
 }