internal static MeetingForwardNotification Create(MeetingRequest request)
        {
            MailboxSession mailboxSession = request.Session as MailboxSession;

            if (mailboxSession == null)
            {
                throw new NotSupportedException();
            }
            MeetingForwardNotification meetingForwardNotification = null;
            bool flag = false;
            MeetingForwardNotification result;

            try
            {
                StoreObjectId defaultFolderId = mailboxSession.GetDefaultFolderId((mailboxSession.LogonType == LogonType.Transport) ? DefaultFolderType.SentItems : DefaultFolderType.Drafts);
                meetingForwardNotification = ItemBuilder.CreateNewItem <MeetingForwardNotification>(mailboxSession, defaultFolderId, request.IsSeriesMessage ? ItemCreateInfo.MeetingForwardNotificationSeriesInfo : ItemCreateInfo.MeetingForwardNotificationInfo);
                meetingForwardNotification.Load(InternalSchema.ContentConversionProperties);
                meetingForwardNotification.Initialize(request, request.IsSeriesMessage ? "IPM.MeetingMessageSeries.Notification.Forward" : "IPM.Schedule.Meeting.Notification.Forward");
                flag   = true;
                result = meetingForwardNotification;
            }
            finally
            {
                if (!flag && meetingForwardNotification != null)
                {
                    meetingForwardNotification.Dispose();
                }
            }
            return(result);
        }
Esempio n. 2
0
        public MeetingForwardNotification CreateNotification()
        {
            this.CheckDisposed("CreateNotification");
            MeetingForwardNotification result = MeetingForwardNotification.Create(this);

            base.LocationIdentifierHelperInstance.SetLocationIdentifier(58869U, LastChangeAction.CreateForwardNotification);
            return(result);
        }