コード例 #1
0
        public async void ShowLog(object parm)
        {
            if (parm == null)
            {
                return;
            }
            string id = parm.ToString();

            DockerVoiceClient mClient = new DockerVoiceClient("tcp://dockerconhack.cloudapp.net:2376");


            CancellationToken token = new CancellationToken(false);

            Stream s = await mClient.ShowLogs(id, token);

            mParent.Logs.Clear();
            using (StreamReader sr = new StreamReader(s))
            {
                string log = "";
                while (!sr.EndOfStream)
                {
                    log = sr.ReadLine();
                    mParent.Logs.Add(new LogEntryViewModel {
                        Text = log
                    });
                }
            }
        }