You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
683 B
23 lines
683 B
using BBWYB.Common.Http;
|
|
|
|
namespace SDKAdapter.PurchasePlatform.Client
|
|
{
|
|
public class PP_PlatformClientFactory
|
|
{
|
|
private IList<PP_PlatformClient> clients;
|
|
|
|
public PP_PlatformClientFactory(RestApiService restApiService)
|
|
{
|
|
clients = new List<PP_PlatformClient>();
|
|
clients.Add(new PP_1688Client(restApiService));
|
|
}
|
|
|
|
public PP_PlatformClient GetClient(AdapterEnums.PlatformType platform)
|
|
{
|
|
var client = clients.FirstOrDefault(c => c.Platform == platform);
|
|
if (client == null)
|
|
throw new Exception("不支持的平台");
|
|
return client;
|
|
}
|
|
}
|
|
}
|
|
|