using BukiVedi.Shared.Services;
using Sleopok.Engine.Services;
using Sleopok.Engine.Services.Storage;

namespace IndexExportTest
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            var library = new Library();


            var store = new DataStorage(@"H:\TEST");
            await Dump(store, "author");
            await Dump(store, "genre");
            await Dump(store, "title");
            await Dump(store, "titlelm");


            Console.ReadLine();
        }

        static async Task Dump(DataStorage store, string field)
        {
            using (var fs = new FileStream($"H:/TEST1/{field}.txt", FileMode.Create, FileAccess.Write, FileShare.None))
            {
                await store.Dump(field, fs);
            }
        }

    }
}
