using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;

using lkfxdok.c;

namespace test.C
{
    public class DataProvider : ILKFFileDataProvider
    {

        public Stream GetFile(int modelYear, string FileName)
        {
            if (modelYear == 2021)
            {
                return new FileStream(string.Format("C:\\LKF\\dataprovider2021\\{0}", FileName), FileMode.Open, FileAccess.Read, FileShare.Read);
            }
            throw new NotSupportedException(string.Format("model {0} unsupported", modelYear));
        }
        public int ProvidesFile(int modelYear, string FileName)
        {
            if (modelYear == 2021)
                return 1;
            return 0;
        }
    }
}
