• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Class SwiftMessage

    Represents a single SWIFT Message that consists of a series of SWIFT Message Blocks.

    Inheritance
    System.Object
    SwiftMessage
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Subsembly.Swift
    Assembly: Subsembly.Sepa.dll
    Syntax
    public class SwiftMessage

    Properties

    Blocks

    The sequence of SWIFT Message Blocks that make up this SWIFT Message.

    Declaration
    public SwiftBlockSequence Blocks { get; }
    Property Value
    Type Description
    SwiftBlockSequence

    LogicalTerminalID

    The Logical Terminal Identification from the Basic Header Block.

    Declaration
    public SepaBIC LogicalTerminalID { get; }
    Property Value
    Type Description
    SepaBIC

    The returned value is a SepaBIC without the Terminal Code. Yet, the Terminal Code character can still be found in the TerminalCode field.

    Exceptions
    Type Condition
    SwiftException

    If a Basic Header Block exists, but the Logical Terminal ID could not be extracted from it, then a SwiftException with Code MalformedBlock is thrown.

    MessageType

    The SWIFT Message Type of this SWIFT Message.

    Declaration
    public int MessageType { get; }
    Property Value
    Type Description
    System.Int32

    The Message Type is extracted from the Application Header Block of the SWIFT Message. If no Application Header Block is present, or the Application Header Block is null or empty, then this property is zero.

    Exceptions
    Type Condition
    SwiftException

    If an Application Header Block exists, but the Message Type could not be extracted from it, then a SwiftException with Code MalformedBlock is thrown.

    TextBlock

    The Text Block data of this SWIFT Message.

    Declaration
    public string TextBlock { get; }
    Property Value
    Type Description
    System.String

    If no Text Block is present, or the Text Block data is empty, then this property is null.

    Methods

    Read(Stream, Int32)

    Reads a single SWIFT Message from an input stream.

    Declaration
    public int Read(Stream aInputStream, int nMaxBytes)
    Parameters
    Type Name Description
    System.IO.Stream aInputStream

    The Stream to read the data from.

    System.Int32 nMaxBytes

    The maximum number of bytes to read from the stream. Use Int32.MaxValue if you do not want to impose any limit. If this is zero, then this method will simply clear this instance.

    Returns
    Type Description
    System.Int32

    Returns the actual number of bytes that have been consumed from the input stream. If the input stream was already at the EOF position when this method was called, then zero is returned. If the parameter nMaxBytes was zero, then this method immediately returns zero, too.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The parameter aInputStream was null.

    System.ArgumentOutOfRangeException

    The parameter nMaxBytes was negative.

    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH