Exemplo n.º 1
0
        /// <summary>
        /// Browse next
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <BrowseNextResponseApiModel> BrowseNextAsync(
            BrowseNextRequestApiModel request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            var result = await _browse.NodeBrowseNextAsync(
                _twin.Endpoint, request.ToServiceModel());

            return(new BrowseNextResponseApiModel(result));
        }
        public async Task <BrowseNextResponseApiModel> BrowseNextAsync(
            string endpointId, [FromBody][Required] BrowseNextRequestApiModel request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            if (request.ContinuationToken == null)
            {
                throw new ArgumentNullException(nameof(request.ContinuationToken));
            }
            var browseresult = await _broser.NodeBrowseNextAsync(endpointId,
                                                                 request.ToServiceModel());

            return(new BrowseNextResponseApiModel(browseresult));
        }