コード例 #1
0
        /// <summary>
        /// Get list of published nodes
        /// </summary>
        /// <param name="service"></param>
        /// <param name="endpointId"></param>
        /// <returns></returns>
        public static async Task <IEnumerable <PublishedItemApiModel> > NodePublishListAllAsync(
            this ITwinServiceApi service, string endpointId)
        {
            var nodes  = new List <PublishedItemApiModel>();
            var result = await service.NodePublishListAsync(endpointId);

            nodes.AddRange(result.Items);
            while (result.ContinuationToken != null)
            {
                result = await service.NodePublishListAsync(endpointId,
                                                            result.ContinuationToken);

                nodes.AddRange(result.Items);
            }
            return(nodes);
        }
コード例 #2
0
 /// <summary>
 /// Get list of published nodes
 /// </summary>
 /// <param name="service"></param>
 /// <param name="endpointId"></param>
 /// <param name="continuation"></param>
 /// <returns></returns>
 public static Task <PublishedItemListResponseApiModel> NodePublishListAsync(
     this ITwinServiceApi service, string endpointId, string continuation = null)
 {
     return(service.NodePublishListAsync(endpointId, new PublishedItemListRequestApiModel {
         ContinuationToken = continuation
     }));
 }