Files
KJD_WebService/TEMUKJD/BLL/ImportConverters/ConvertToPddFactory.cs
T

39 lines
667 B
C#

using AllBase.Model.Result.PDDResult;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TemuKJD.BLL.ImportConverters;
namespace TemuKJD.BLL.ImportConverts
{
public class ConverterToPddFactory
{
private static List<IGoodsConverter> _converters = new List<IGoodsConverter>
{
new ConverterToPddV5(),
};
public static PDDFrontProductInfo5 Convert(string data)
{
foreach (var item in _converters)
{
try
{
if (item.IsMatch(data))
{
return item.Convert();
}
}
catch (Exception ex)
{
throw ex;
}
}
return null;
}
}
}