using System.Collections.Generic; using System.Linq; namespace WX.Interface.Security { public sealed class ClientKey { private ClientKey(string _Id, string _Name, string _AccessKey) { Id = _Id; Name = _Name; AccessKey = _AccessKey; } public string Id { get; private set; } public string Name { get; private set; } public string AccessKey { get; private set; } private static List clientList; static ClientKey() { clientList = new List(); clientList.Add(new ClientKey("UPWEBSITE", "UP网站", "1622a92d")); clientList.Add(new ClientKey("TDORDERSITE", "订单接口", "622a92d1")); clientList.Add(new ClientKey("UPPRODUCT", "UP产品端", "c268a2cd")); clientList.Add(new ClientKey("gd_crm", "UPCRM", "upchina.")); clientList.Add(new ClientKey("nj_crm", "UPCRM", "pchina.1")); clientList.Add(new ClientKey("AYCRM2_CTI", "CTI", "ac910f51")); clientList.Add(new ClientKey("WX_EXT", "企微相关外部链接", "dwj5rc8x")); clientList.Add(new ClientKey("WK_EXT", "WK_EXT", "dwj5rc8x")); clientList.Add(new ClientKey("PT1WEBSITE", "PT1WEBSITE", "1633a92d")); clientList.Add(new ClientKey("saleclue", "saleclue", "dwddsj5d"));//线索专用,跨本系统 } public static ClientKey GetClientKey(string clientId) { return clientList.FirstOrDefault(obj => obj.Id == clientId); } } }