using Newtonsoft.Json.Linq; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CloudGaming.Core.AgileConfig.AgileConfigClient; using System.Text.Json; namespace CloudGaming.Core.AgileConfig { /// /// /// public static class AgileConfigExtend { public static Dictionary ConvertToDictionary(this List apiAppVMs) { Dictionary keyValuePairs = new Dictionary(); apiAppVMs.ForEach(apiAppVM => { keyValuePairs.Add($"{(string.IsNullOrEmpty(apiAppVM.Group) ? "" : apiAppVM.Group + ":")}{apiAppVM.Key}", apiAppVM.Value); }); return keyValuePairs; } } }