using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IStation.Bimface;
namespace IStation
{
///
/// 调用入口
///
public sealed partial class BimfaceClient
{
///
/// 获取BimfaceClient对象
///
public static BimfaceClient GetClient(string appkey, string appsecret)
{
if (_appClients == null)
{
_appClients = new List();
var bimfaceclient = new BimfaceClient(appkey, appsecret);
_appClients.Add(new AppClient(appkey, appsecret, bimfaceclient));
return bimfaceclient;
}
var client = _appClients.Find(x => x.AppKey == appkey && x.AppSecret == appsecret);
if (client == null)
{
var bimfaceclient = new BimfaceClient(appkey, appsecret);
client = new AppClient(appkey, appsecret, bimfaceclient);
_appClients.Add(client);
}
return client.Client;
}
//bimfaceclient列表
private static List _appClients = null;
}
}