/// <summary>
        /// This method is used to create Ping request.
        /// </summary>
        /// <param name="folderID">The value of the FolderId element.</param>
        /// <param name="pingFolderClass">An instance of the PingFolderClass.</param>
        /// <returns>The Ping request.</returns>
        private static PingRequest CreatePingRequest(string folderID, Request.PingFolderClass pingFolderClass)
        {
            Request.PingFolder pingFolder = new Request.PingFolder
            {
                Class = pingFolderClass,
                Id    = folderID
            };

            return(Common.CreatePingRequest(new Request.PingFolder[] { pingFolder }, "80"));
        }
        /// <summary>
        /// This method is designed to create Ping request.
        /// </summary>
        /// <param name="folderIDList">The List value of the FolderId element.</param>
        /// <param name="pingFolderClass">An instance of the PingFolderClass.</param>
        /// <returns>The Ping request.</returns>
        private static PingRequest CreateMultiFolderPingRequest(List <string> folderIDList, Request.PingFolderClass pingFolderClass)
        {
            List <Request.PingFolder> pingRequestList = new List <Request.PingFolder>();

            foreach (string folderID in folderIDList)
            {
                Request.PingFolder pingFolder = new Request.PingFolder {
                    Class = pingFolderClass, Id = folderID
                };
                pingRequestList.Add(pingFolder);
            }

            return(Common.CreatePingRequest(pingRequestList.ToArray(), "80"));
        }
        /// <summary>
        /// This method is designed to create Ping request.
        /// </summary>
        /// <param name="folderIDList">The List value of the FolderId element.</param>
        /// <param name="pingFolderClass">An instance of the PingFolderClass.</param>
        /// <returns>The Ping request.</returns>
        private static PingRequest CreateMultiFolderPingRequest(List<string> folderIDList, Request.PingFolderClass pingFolderClass)
        {
            List<Request.PingFolder> pingRequestList = new List<Request.PingFolder>();
            foreach (string folderID in folderIDList)
            {
                Request.PingFolder pingFolder = new Request.PingFolder { Class = pingFolderClass, Id = folderID };
                pingRequestList.Add(pingFolder);
            }

            return Common.CreatePingRequest(pingRequestList.ToArray(), "80");
        }
        /// <summary>
        /// This method is used to create Ping request.
        /// </summary>
        /// <param name="folderID">The value of the FolderId element.</param>
        /// <param name="pingFolderClass">An instance of the PingFolderClass.</param>
        /// <returns>The Ping request.</returns>
        private static PingRequest CreatePingRequest(string folderID, Request.PingFolderClass pingFolderClass)
        {
            Request.PingFolder pingFolder = new Request.PingFolder
            {
                Class = pingFolderClass,
                Id = folderID
            };

            return Common.CreatePingRequest(new Request.PingFolder[] { pingFolder }, "80");
        }
        /// <summary>
        /// Call Ping command to request that the server monitor specified folder for changes.
        /// </summary>
        /// <param name="collectionId">The CollectionId of the server monitor specified folder.</param>
        /// <returns>The response of Ping command.</returns>
        protected PingResponse CallPingCommand(string collectionId)
        {
            // Create the Ping command request
            Request.PingFolder[] pingFolders = new Request.PingFolder[1];
            pingFolders[0] = new Request.PingFolder { Class = Request.PingFolderClass.Email, Id = collectionId };
            PingRequest pingRequest = Common.CreatePingRequest(pingFolders, "80");

            // Call Ping command by HTTP POST.
            SendStringResponse pingResponseString = this.HTTPAdapter.HTTPPOST(CommandName.Ping, null, pingRequest.GetRequestDataSerializedXML());

            PingResponse pingResponse = new PingResponse { ResponseDataXML = pingResponseString.ResponseDataXML };
            pingResponse.DeserializeResponseData();

            return pingResponse;
        }