using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using XMLParser.Model;
using XMLParser.Contract;

namespace XMLParser.Functions 
{
    public abstract class CSVWriterBase : ICSVWriter 
    {
        internal FileStream handle = null;

        public void WriteBaried(string content)
        {
            throw new NotImplementedException();
        }

        public abstract void WriteEntry(Dictionary<ECalculatedResult, decimal> calculated, List<KanalObjekt> inspektionenAmTag);

        internal void writeToFile(string content)
        {
            content += Environment.NewLine;
            byte[] bytes = Encoding.UTF8.GetBytes(content);
            handle.Write(bytes,0,bytes.Length);
            handle.Flush();
        }
    }
}