Share via


DimeReader.ReadRecord Method

Returns the next record in the DIME message in read-only mode.

Namespace: Microsoft.Web.Services2.Dime
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim returnValue As DimeRecord
Dim dimeReader1 As DimeReader
returnValue = dimeReader1.ReadRecord()

Syntax

'Declaration
Public Function ReadRecord() As DimeRecord
public DimeRecord ReadRecord();
public: DimeRecord^ ReadRecord();
public DimeRecord ReadRecord();
public function ReadRecord() : DimeRecord;

Return Value

A read-only DimeRecord, or null if at the end of the DIME message or if the record has TNF= None and is the last record in the message.

Exceptions

Exception type Condition
System.InvalidOperationException

The current record is closed.

DimeFormatException

The first record lacks the message begin flag or subsequent records have the flag.

Remarks

If the DimeReader is closed, then an System.InvalidOperationException will be thrown. When the end of the message is reached, the ReadRecord method will return null. A call to ReadRecord is a blocking I/O call because the DIME record header is read before the method returns.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

DimeReader Class
Microsoft.Web.Services2.Dime Namespace

Other Resources

DimeReader Members