Example #1
0
        /// <summary>
        /// Retrieves default persistence profiles.
        /// </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{DefaultPersistenceProfileType}"/></returns>
        public async Task <PagedResponse <DefaultPersistenceProfileType> > GetDefaultPersistenceProfilesPaginated(Guid networkDomainId, DefaultPersistenceProfileListOptions options = null, PageableRequest pagingOptions = null)
        {
            var response = await _api.GetAsync <defaultPersistenceProfiles>(ApiUris.GetDefaultPersistenceProfile(_api.OrganizationId, networkDomainId), pagingOptions, options);

            return(new PagedResponse <DefaultPersistenceProfileType>
            {
                items = response.defaultPersistenceProfile,
                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
            });
        }
Example #2
0
        /// <summary>
        /// Retrieves default persistence profiles.
        /// </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="DefaultPersistenceProfileType"/></returns>
        public async Task <IEnumerable <DefaultPersistenceProfileType> > GetDefaultPersistenceProfiles(Guid networkDomainId, DefaultPersistenceProfileListOptions options = null)
        {
            var response = await GetDefaultPersistenceProfilesPaginated(networkDomainId, options, null);

            return(response.items);
        }