Exemplo n.º 1
0
        /// <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"));
        }
Exemplo n.º 2
0
        /// <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"));
        }