public void ContainerKillOnCloseCannotHang()
        {
            var cs = new ContainerSettings
            {
                SandboxPath = sandbox.path,
                Layers      = sandbox.layers,
                KillOnClose = true,
                NetworkId   = HostComputeService.FindNatNetwork(),
            };
            var container = HostComputeService.CreateContainer(id.ToString(), cs);

            container.Start();
            Assert.True(Task.Factory.StartNew(() => { container.Dispose(); }).Wait(10000));
            Assert.ThrowsAny <Exception>(() => { HostComputeService.GetComputeSystem(id.ToString()); });
        }
        public HvContainer()
        {
            HcsFactory    hcsFactory   = new HcsFactory();
            IHcs          Hvhcs        = HcsFactory.GetHcs();
            DockerMonitor dockerLoader = new DockerMonitor();
            IList <ContainerListResponse> containerListResponses = dockerLoader.GetContainerListAsync().GetAwaiter().GetResult();

            foreach (ContainerListResponse c in containerListResponses)
            {
                Container container = HostComputeService.GetComputeSystem(c.ID);
                dockerLoader.GetContainerStats(c.ID).GetAwaiter().GetResult();
                //Console.WriteLine(perfInfo.memLimit);
                //Console.WriteLine(container.GetType().Name);

                //ContainerSettings containerSettings = new ContainerSettings();

                //Console.WriteLine(container.);
            }
        }