Example #1
0
        /// <summary>
        /// Read Key
        /// </summary>
        private static void ReadKey()
        {
            var kvGovern = new KVGovern();
            var result   = kvGovern.ReadKey(new ReadKeyParmeter {
                Key = "testkey"
            }).GetAwaiter().GetResult();

            Console.WriteLine(EntityToString(result));
        }
Example #2
0
 /// <summary>
 /// 加载配置文件
 /// </summary>
 private void LoadConfig()
 {
     try
     {
         var kvGovern = new KVGovern();
         var result   = kvGovern.ReadKey(new ReadKeyParmeter {
             Key = "", Recurse = true
         });
         listKV.DataSource                 = result;
         listKV.DisplayMember              = "Key";
         listKV.ValueMember                = "DecodeValue";
         this.listKV.SelectedIndexChanged -= new System.EventHandler(this.listKV_SelectedIndexChanged);
         this.listKV.SelectedIndexChanged += new System.EventHandler(this.listKV_SelectedIndexChanged);
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message);
     }
 }