示例#1
0
        /// <summary>
        /// Returns the number of recipient events based on the specified parameters
        /// </summary>
        /// <param name="options">the options for this query</param>
        /// <returns>the number of recipient events</returns>
        public long GetRecipientsCount(RecipientParameters options)
        {
            QueryParameters parameters = options.GetQueryParameters();
            ResponseWrapper response   = Get("reports/recipients/count", parameters);

            return(SerializationUtils <long> .FromXmlString(response.Body, "count"));
        }
示例#2
0
        /// <summary>
        /// Returns a page of recipient events based on the specified parameters
        /// </summary>
        /// <param name="options">the options for this query</param>
        /// <param name="pageIndex">the index of the page</param>
        /// <param name="pageSize">the size of the page</param>
        /// <returns>a page of recipient events</returns>
        public Page <Recipient> GetRecipients(RecipientParameters options, int pageIndex, int pageSize)
        {
            QueryParameters parameters = CreatePageQueryParameters(pageIndex, pageSize, options);

            ResponseWrapper  response = Get("reports/recipients", parameters);
            Page <Recipient> page     = new Page <Recipient>(pageIndex, pageSize, response);

            page.Items = SerializationUtils <RecipientCollection> .FromXmlString(response.Body);

            return(page);
        }