using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using IStation.Bimface;
|
|
namespace IStation
|
{
|
/// <summary>
|
/// 调用入口
|
/// </summary>
|
public sealed partial class BimfaceClient
|
{
|
/// <summary>
|
/// 获取BimfaceClient对象
|
/// </summary>
|
public static BimfaceClient GetClient(string appkey, string appsecret)
|
{
|
if (_appClients == null)
|
{
|
_appClients = new List<AppClient>();
|
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<AppClient> _appClients = null;
|
|
}
|
|
}
|