private void StartFileReader(FileDirector director) { Logger.Log($"Core.StartFileReader start"); string file = _adapter.GetFileName(director.Extension); //if (!File.Exists(file)) // throw new Exception("File not exsist"); IReader reader = _factory.BuildReader(director); try { IEnumerable <LogElement> toAdd = reader.Open(file); _dataContainer.Add(toAdd); _adapter.BindData(_dataContainer); Logger.Log($"Core.StartFileReader done"); } catch (Exception ex) { Logger.Log(ex.Message); } }
internal IReader BuildReader(FileDirector director) { return(new FileReader(director.RegEx)); }