Beispiel #1
0
 private void Write(SwiftMessage message)
 {
     WriteBlock1(message.Block1);
     WriteBlock2(message.Block2);
     WriteBlock3(message.Block3);
     WriteBlock4(message.Block4);
     WriteBlock5(message.Block5);
 }
Beispiel #2
0
        private SwiftMessage Parse(string messageText)
        {
            List <string> blocks = ReadBlocks(messageText);

            if ((blocks == null) || (blocks.Count == 0))
            {
                throw new SwiftParserException("Error while reading blocks");
            }

            SwiftMessage swiftMessage = new SwiftMessage();

            foreach (var blockText in blocks)
            {
                SwiftBlockBase block = CreateBlock(blockText);
                swiftMessage.SetBlock(block);
            }

            return(swiftMessage);
        }
Beispiel #3
0
 public static string Write(SwiftMessage message)
 {
     return(new SwiftWriter().GetFinMessage(message));
 }
Beispiel #4
0
 public string GetFinMessage(SwiftMessage message)
 {
     Write(message);
     return(stringBuilder.ToString());;
 }