public LogRecordParts GenerateRecord()
 {
     var recordParts = new LogRecordParts
     {
         IpAddress = _ipAddressGenerator.Generate(),
         Hyphen = _hyphenGenerator.Generate(),
         UserId = _userIdGenerator.Generate(),
         Date = _dateGenerator.Generate(),
         RequestLine = _requestLineGenerator.Generate(),
         CodeDefinition = _codeDefinitionGenerator.Generate(),
         FileSize = _fileSizeGenerator.Generate(),
     };
     return recordParts;
 }
 private LogRecordParts GetLogRecord(IList<string> recordParts)
 {
     var logrecord = new LogRecordParts
     {
         IpAddress = _ipAddressConverter.Convert(recordParts[0]),
         Hyphen = _hyphenConverter.Convert(recordParts[1]),
         UserId = _userIdConverter.Convert(recordParts[2]),
         Date = _dateConverter.Convert(recordParts[3]),
         RequestLine = _requestLineConverter.Convert(recordParts[4]),
         CodeDefinition = _codeDefinitionConverter.Convert(recordParts[5]),
         FileSize = _fileSizeConverter.Convert(recordParts[6])
     };
     return logrecord;
 }
        public string Convert(LogRecordParts recordParts)
        {
            listConverter = new List<IConverter<string>>
            {
                new IpAddressConverter(recordParts.IpAddress),
                new HyphenConverter(recordParts.Hyphen),
                new UserIdConverter(recordParts.UserId),
                new DateConverter(recordParts.Date),
                new RequestLineConverter(recordParts.RequestLine),
                new CodeDefinitionConverter(recordParts.CodeDefinition),
                new FileSizeConverter(recordParts.FileSize),
            };

            _stringBuilder = new StringBuilder();
            foreach (var converter in listConverter)
                _stringBuilder.Append(converter.Convert()).Append(" ");
            return _stringBuilder.ToString();
        }