﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LearningFieldMDB
{
    public class MicrosoftAccessValidation
    {
        private MicrosoftAccessFile _file;

        private MicrosoftAccessValidation()
        {
            //
        }

        public MicrosoftAccessValidation(MicrosoftAccessFile file)
        {
            _file = file;
        }

        public bool IsValid()
        {
            bool isValid = false;

            string fileExtension = Path.GetExtension(_file.FileName);
            isValid = fileExtension.ToLower() == "mdb";

            //add other validations ex: file size, number of tables etc

            return isValid;
        }
    }
}
