Пример #1
0
        /// <summary>
        /// Retrieves default iRules.
        /// </summary>
        /// <param name="networkDomainId">The network domain id</param>
        /// <param name="options">The filter options</param>
        /// <param name="pagingOptions">The paging options</param>
        /// <returns>The async task of <see cref="PagedResponse{DefaultIruleType}"/></returns>
        public async Task <PagedResponse <DefaultIruleType> > GetDefaultIrulesPaginated(Guid networkDomainId, DefaultIruleListOptions options = null, PageableRequest pagingOptions = null)
        {
            var response = await _api.GetAsync <defaultIrules>(ApiUris.GetDefaultIrule(_api.OrganizationId, networkDomainId), pagingOptions, options);

            return(new PagedResponse <DefaultIruleType>
            {
                items = response.defaultIrule,
                totalCount = response.totalCountSpecified ? response.totalCount : (int?)null,
                pageCount = response.pageCountSpecified ? response.pageCount : (int?)null,
                pageNumber = response.pageNumberSpecified ? response.pageNumber : (int?)null,
                pageSize = response.pageSizeSpecified ? response.pageSize : (int?)null
            });
        }
Пример #2
0
        /// <summary>
        /// Retrieves default iRules.
        /// </summary>
        /// <param name="networkDomainId">The network domain id</param>
        /// <param name="options">The filter options</param>
        /// <returns>The async task of collection of <see cref="DefaultIruleType"/></returns>
        public async Task <IEnumerable <DefaultIruleType> > GetDefaultIrules(Guid networkDomainId, DefaultIruleListOptions options = null)
        {
            var response = await GetDefaultIrulesPaginated(networkDomainId, options, null);

            return(response.items);
        }