예제 #1
0
        public async Task ListExtPipes()
        {
            // Arrange
            var query = new ExtPipeQuery
            {
                Limit = 10
            };

            // Act
            // Listing may take some time to resolve.
            ItemsWithCursor <ExtPipe> result = null;

            for (int i = 0; i < 10; i++)
            {
                result = await tester.Write.ExtPipes.ListAsync(query);

                if (result.Items.Any())
                {
                    break;
                }
                await Task.Delay(1000);
            }

            // Assert
            Assert.True(result.Items.Any());
        }
예제 #2
0
        /// <summary>
        /// Returns list of extraction pipelines matching query.
        /// </summary>
        /// <param name="query">Query filter to use</param>
        /// <param name="token">Optional cancellation token</param>
        /// <returns>List of extraction pipelines matching given filters, and optional cursor</returns>
        public async Task <ItemsWithCursor <ExtPipe> > ListAsync(ExtPipeQuery query, CancellationToken token = default)
        {
            if (query is null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            var req = Oryx.Cognite.ExtPipes.list(query);

            return(await RunAsync(req, token).ConfigureAwait(false));
        }