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.
24 lines
683 B
24 lines
683 B
2 years ago
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|