public void ParseSwiftMessage(string swiftFormattedFile) { MTParser message = new MTParser(); TagFactory tagFactory = new TagFactory(); List <string> listOfTags = new List <string>(); List <ITag> listOfITags = new List <ITag>(); Dictionary <string, string> swiftBlocks = message.SeperateSWIFTFile(swiftFormattedFile); listOfTags = message.Block4ToList(swiftBlocks["TextBlock"]); this.Block1 = new BasicHeader(swiftBlocks); this.Block2 = new ApplicationHeader(swiftBlocks); foreach (var tag in listOfTags) { listOfITags = tagFactory.CreateInstance(tag, listOfITags); } this.Block4 = listOfITags; }