public IEnumerable <IEdiMessage> Parse(string contents) { var segments = _segmentSplitter.Split(contents); var fileInfo = _fileReader.Read(segments); return(_generator.GenerateMessages(fileInfo, BusinessPartner.Initech)); }
private List <Message> GenerateMessages(List <string> nodesIds, DateTime currentTime, List <INode> nodes) { var messages = _messageGenerator.GenerateMessages(_settings.MessagesSettings, nodesIds, currentTime); foreach (var message in messages) { var node = nodes.Find(x => x.GetId().Equals(message.StartId)); node !.Receive(message); } return(messages); }