示例#1
0
 protected override async Task ProcessRecordAsync()
 {
     foreach (var id in ParameterResolvers.GetContainerIds(Container, ContainerIdOrName))
     {
         WriteObject(await DkrClient.Containers.InspectContainerAsync(id));
     }
 }
        protected override async Task ProcessRecordAsync()
        {
            foreach (var id in ParameterResolvers.GetNetworkIds(Network, Id))
            {
                var n = await DkrClient.Networks.InspectNetworkAsync(id);

                this.WriteObject(n);
            }
        }
        protected override async Task ProcessRecordAsync()
        {
            var filePath = System.IO.Path.Combine(SessionState.Path.CurrentFileSystemLocation.Path, DestinationFilePath);
            var names    = new List <string>(ParameterResolvers.GetImageIds(Image, Id));

            using (var fs = File.Create(filePath))
                using (var stream = await DkrClient.Miscellaneous.GetImagesAsTarballAsync(names.ToArray(), CmdletCancellationToken))
                    using (CmdletCancellationToken.Register(() => stream.Dispose()))
                    {
                        await stream.CopyToAsync(fs);
                    }
        }