コード例 #1
0
        /// <summary>
        /// 获取所有客户端
        /// </summary>
        /// <returns></returns>
        public virtual bool ValideClient(string clientUrl)
        {
            IEnumerable <ClientEntity> clientList = DataBaseUtils.getAllClient();

            foreach (ClientEntity client in clientList)
            {
                if (client.AppSvcUrl.Equals(clientUrl))
                {
                    return(true);
                }
            }
            return(false);
        }
コード例 #2
0
        /// <summary>
        /// 获取客户端实例
        /// </summary>
        /// <returns></returns>
        public virtual ClientEntity GetClient(string clientUrl)
        {
            IEnumerable <ClientEntity> clientList = DataBaseUtils.getAllClient();

            foreach (ClientEntity client in clientList)
            {
                if (client.AppSvcUrl.Equals(clientUrl))
                {
                    return(client);
                }
            }
            throw new Exception("无效客户端");
        }
コード例 #3
0
 /// <summary>
 /// 获取所有客户端
 /// </summary>
 /// <returns></returns>
 public virtual IEnumerable <ClientEntity> getAllClient()
 {
     return(DataBaseUtils.getAllClient());
 }