コード例 #1
0
        /// <summary>
        /// List Events
        /// </summary>
        private static void ListEvents()
        {
            var eventGovern = new EventGovern();
            var result      = eventGovern.EventList(new ListEventParmeter {
                Name = "fireevent", Node = "n1", Service = "lisapi", Tag = "lisapi"
            }).GetAwaiter().GetResult();

            Console.WriteLine($"back content={EntityToString(result)}");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: JackMGLiu/ConsulSharp
 static void ListEvents()
 {
     try
     {
         var eve    = new EventGovern();
         var result = eve.EventList(new ListEventParmeter {
             Name = "deploy"
         }).GetAwaiter().GetResult();
         foreach (var env in result)
         {
             Console.WriteLine(EntityToString(env));
         }
     }
     catch (Exception exc)
     {
         Console.WriteLine($"错误:{exc.Message}");
     }
 }