Exemplo n.º 1
0
        public async Task <ContainerListResponse> ByPropertyAsync(string property, string value, CancellationToken ct = default)
        {
            var filters = new FilterByProperty {
                { property, value }
            };

            return((await this.Docker.Containers.ListContainersAsync(new ContainersListParameters {
                All = true, Filters = filters
            }, ct)
                    .ConfigureAwait(false)).FirstOrDefault());
        }
Exemplo n.º 2
0
        public async Task <NetworkResponse> ByPropertyAsync(string property, string value, CancellationToken ct = default)
        {
            var filters = new FilterByProperty {
                { property, value }
            };

            return((await this.Docker.Networks.ListNetworksAsync(new NetworksListParameters {
                Filters = filters
            }, ct)
                    .ConfigureAwait(false)).FirstOrDefault());
        }