Beispiel #1
0
        public PostItem ReplyToFolder(StoreSession session, StoreId parentFolderId, ReplyForwardConfiguration configuration)
        {
            this.CheckDisposed("ReplyToFolder");
            Util.ThrowOnNullArgument(session, "session");
            Util.ThrowOnNullArgument(parentFolderId, "parentFolderId");
            Util.ThrowOnNullArgument(configuration, "configuration");
            PostItem postItem = null;
            bool     flag     = false;
            PostItem result;

            try
            {
                postItem = PostItem.Create(session, parentFolderId);
                ReplyCreation replyCreation = new ReplyCreation(this, postItem, configuration, false, false, true);
                replyCreation.PopulateProperties();
                postItem[InternalSchema.IconIndex] = IconIndex.PostItem;
                flag   = true;
                result = postItem;
            }
            finally
            {
                if (!flag && postItem != null)
                {
                    postItem.Dispose();
                    postItem = null;
                }
            }
            return(result);
        }
 protected override void UpdateNewItemProperties()
 {
     base.UpdateNewItemProperties();
     if (this.originalItem is CalendarItemBase || this.originalItem is MeetingRequest || this.originalItem is MeetingCancellation)
     {
         this.newItem.SafeSetProperty(InternalSchema.IsReplyRequested, false);
         this.newItem.SafeSetProperty(InternalSchema.IsResponseRequested, false);
         ReplyCreation.UpdateMeetingReplyIconIndex(this.newItem);
     }
     if (!(this.newItem is PostItem))
     {
         this.BuildRecipients();
     }
     this.newItem.SafeSetProperty(InternalSchema.Importance, Importance.Normal);
 }