NoSugarNet/NoSugarNet.Adapter/DataHelper/CompressAdapterSelector.cs
2024-06-26 14:10:05 +08:00

18 lines
580 B
C#

using NoSugarNet.Adapter.DataHelper;
namespace NoSugarNet.Adapter.DataHelper
{
public static class CompressAdapterSelector
{
static Dictionary<E_CompressAdapter, CompressAdapter> mDictAdapter = new Dictionary<E_CompressAdapter, CompressAdapter>();
public static CompressAdapter Adapter(E_CompressAdapter adptType)
{
if(mDictAdapter.ContainsKey(adptType))
return mDictAdapter[adptType];
mDictAdapter[adptType] = new CompressAdapter(adptType);
return mDictAdapter[adptType];
}
}
}