mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-01-15 03:42:04 +01:00
Eleminated redundant code that was used for loading/applying reference lists in CSV or TXT/CHL format.
21 lines
496 B
C#
21 lines
496 B
C#
using System.IO;
|
|
|
|
namespace ChanSort.Api
|
|
{
|
|
public class RefSerializerPlugin : ISerializerPlugin
|
|
{
|
|
public string PluginName => "ChanSort Reference List";
|
|
|
|
public string FileFilter => "*.txt;*.chl;*.csv";
|
|
|
|
public SerializerBase CreateSerializer(string inputFile)
|
|
{
|
|
var ext = (Path.GetExtension(inputFile) ?? "").ToLower();
|
|
if (ext == ".csv")
|
|
return new CsvFileSerializer(inputFile);
|
|
else
|
|
return new RefSerializer(inputFile);
|
|
}
|
|
}
|
|
}
|