public ReadWriteResult ReadData()
        {
            ReadWriteResult ret = new ReadWriteResult {
                Success = true
            };

            try
            {
                var dataFiles = Directory.GetFiles(this.dataDirectory, "*md", SearchOption.TopDirectoryOnly);
                foreach (var dataFile in dataFiles)
                {
                    logger.Debug("start reading data from file: {0}", dataFile);
                    if (File.Exists(dataFile))
                    {
                        var readAllLines = File.ReadAllLines(dataFile);
                        int i            = 0;
                        foreach (var wdLine in readAllLines)
                        {
                            if (!string.IsNullOrWhiteSpace(wdLine.Replace("\0", "")))
                            {
                                var wdDateData  = wdLine.Token("|", 1);
                                var wdDateParts = wdDateData.Split(',').Select(s => Convert.ToInt32(s)).ToList();
                                var data        = new WorkDayPersistenceData
                                {
                                    Year       = wdDateParts.ElementAt(0),
                                    Month      = wdDateParts.ElementAt(1),
                                    Day        = wdDateParts.ElementAt(2),
                                    LineNumber = i,
                                    FileName   = dataFile
                                };

                                var wdStringData = wdLine.Token("|", 2);
                                data.OriginalString = wdStringData.Replace("&#x007C;", "|").Replace("<br />", Environment.NewLine);

                                this.workDaysData.Add(data);
                                i++;
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                ret.Success = false;
                ret.Error   = exception.Message;
                logger.Error(exception, "readdata failed");
            }

            return(ret);
        }
        public ReadWriteResult ReadData()
        {
            ReadWriteResult ret = new ReadWriteResult {Success = true};
              try {
            var dataFiles = Directory.GetFiles(this.dataDirectory, "*md", SearchOption.TopDirectoryOnly);
            foreach (var dataFile in dataFiles) {
              logger.Debug("start reading data from file: {0}", dataFile);
              if (File.Exists(dataFile)) {
            var readAllLines = File.ReadAllLines(dataFile);
            int i = 0;
            foreach (var wdLine in readAllLines) {
              string wdDateData = wdLine.Token("|", 1);
              var wdDateParts = wdDateData.Split(',').Select(s => Convert.ToInt32(s));
              WorkDayPersistenceData wdpd = new WorkDayPersistenceData();
              wdpd.Year = wdDateParts.ElementAt(0);
              wdpd.Month = wdDateParts.ElementAt(1);
              wdpd.Day = wdDateParts.ElementAt(2);
              wdpd.LineNumber = i;
              wdpd.FileName = dataFile;

              string wdStringData = wdLine.Token("|", 2);
              wdpd.OriginalString = wdStringData.Replace("<br />", Environment.NewLine);
              this.workDaysData.Add(wdpd);
              i++;
            }
              }
            }
              }
              catch (Exception exception) {
            ret.Success = false;
            ret.Error = exception.Message;
            logger.ErrorException("readdata failed", exception);
              }
              return ret;
        }