/// <summary>
        /// Browse next
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <BrowseNextResponseApiModel> BrowseNextAsync(
            BrowseNextRequestInternalApiModel request)
        {
            kBrowseNextAsync.Inc();
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            var result = await _browse.NodeBrowseNextAsync(
                await _twin.GetEndpointAsync(), request.ToServiceModel());

            return(result.ToApiModel());
        }
示例#2
0
 /// <summary>
 /// Convert back to service model
 /// </summary>
 /// <returns></returns>
 public static BrowseNextRequestModel ToServiceModel(
     this BrowseNextRequestInternalApiModel model)
 {
     if (model == null)
     {
         return(null);
     }
     return(new BrowseNextRequestModel {
         NodeIdsOnly = model.NodeIdsOnly,
         Abort = model.Abort,
         TargetNodesOnly = model.TargetNodesOnly,
         ReadVariableValues = model.ReadVariableValues,
         ContinuationToken = model.ContinuationToken,
         Header = model.Header.ToServiceModel()
     });
 }