示例#1
0
 private void btnServiceQuery_Click(object sender, EventArgs e)
 {
     try
     {
         var agentGovern = new AgentGovern();
         gridService.DataSource = agentGovern.ListServices().Values.ToList();
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message);
     }
 }
示例#2
0
        /// <summary>
        /// List Services
        /// </summary>
        static void ListServices()
        {
            var agentGovern = new AgentGovern();
            var list        = agentGovern.ListServices().GetAwaiter().GetResult();

            foreach (var item in list)
            {
                Console.WriteLine($"{item.Key}");
                Console.WriteLine(EntityToString(item.Value));
                Console.WriteLine("-----------------------------------------------");
            }
        }