33 lines
860 B
C#
33 lines
860 B
C#
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
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public static class AgileConfigExtend
|
|
{
|
|
|
|
public static Dictionary<string, string> ConvertToDictionary(this List<ApiConfigVM> apiAppVMs)
|
|
{
|
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
|
apiAppVMs.ForEach(apiAppVM =>
|
|
{
|
|
|
|
keyValuePairs.Add($"{(string.IsNullOrEmpty(apiAppVM.Group) ? "" : apiAppVM.Group + ":")}{apiAppVM.Key}", apiAppVM.Value);
|
|
});
|
|
return keyValuePairs;
|
|
}
|
|
|
|
}
|
|
}
|