Files
ChanSort/ChanSort.Loader.TllFile/TllFileSerializerPlugin.cs
hbeham 8d22767ec2 - cleanup (renamed directories to match project structure)
- tested and fixed Samsung favorites and locks for C,D,AstraHD
2013-04-03 15:01:53 +02:00

28 lines
790 B
C#

using System.IO;
using ChanSort.Api;
namespace ChanSort.Loader.TllFile
{
public class TllFileSerializerPlugin : ISerializerPlugin
{
private const int MAX_FILE_SIZE = 16*1000*1000;
private readonly string ERR_fileTooBig = Resource.TllFileSerializerPlugin_ERR_fileTooBig;
public string PluginName { get { return Resource.TllFileSerializerPlugin_PluginName; } }
public string FileFilter { get { return "*.TLL"; } }
#region CreateSerializer()
public SerializerBase CreateSerializer(string inputFile)
{
long fileSize = new FileInfo(inputFile).Length;
if (fileSize > MAX_FILE_SIZE)
throw new IOException(string.Format(ERR_fileTooBig, fileSize, MAX_FILE_SIZE));
return new TllFileSerializer(inputFile);
}
#endregion
}
}