Example #1
0
        /// <summary>
        /// Create a new MessageHeaderRequest
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="callback"></param>
        public MessageHeaderRequest(IFolder folder, RequestCompletedCallback callback)
            : base(callback)
        {
            if (folder == null)
            {
                throw new NullReferenceException("MessageHeaderRequest: folder is null");
            }

            PreCommand    = new ExamineFolderCommand(folder, null);
            Command       = new MessageHeaderCommand(folder, null);
            ProcessorType = typeof(MessageHeaderProcessor);
        }
Example #2
0
        /// <summary>
        /// Create a new MessageHeaderRequest
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="callback"></param>
        public MessageHeaderRequest(IMessage msg, RequestCompletedCallback callback)
            : base(callback)
        {
            if (msg == null)
            {
                throw new NullReferenceException("MessageHeaderRequest: msg is null");
            }

            if (msg.HeaderLoaded)
            {
                return;
            }

            PreCommand    = new ExamineFolderCommand(msg.Folder, null);
            Command       = new MessageHeaderCommand(msg, null);
            ProcessorType = typeof(MessageHeaderProcessor);
        }