DimeWriter.LastRecord Method (String, String, TypeFormat)

Creates and returns the last record in a DIME message with a specified ID and of a specified payload type, typeFormat that uses chunked mode

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

Usage

'Usage
Dim id As String
Dim type As String
Dim typeFormat As TypeFormat
Dim returnValue As DimeRecord
Dim dimeWriter1 As DimeWriter
returnValue = dimeWriter1.LastRecord(id, type, typeFormat)

Syntax

'Declaration
Overloads Public Function LastRecord( _
    ByVal id As String, _
    ByVal type As String, _
    ByVal typeFormat As TypeFormat _
) As DimeRecord
public DimeRecord LastRecord(
    string id, 
    string type, 
    TypeFormat typeFormat
);
public: DimeRecord^ LastRecord(
    String^ id, 
    String^ type, 
    TypeFormat^ typeFormat
);
public DimeRecord LastRecord(
    System.String id, 
    System.String type, 
    TypeFormat typeFormat
);
public function LastRecord(
     id : String, 
     type : String, 
     typeFormat : TypeFormat
) : DimeRecord;

Parameters

  • id
    A System.Uri containing the absolute or relative URI identifying the record.
  • type
    The type of the payload.
  • typeFormat
    One of TypeFormat values that specifies the format of the payload type.

Return Value

The DimeRecord with the specified values.

Exceptions

Exception type Condition
System.ArgumentNullException

The id or type is null .

System.InvalidOperationException

Either the DIME message has been closed.

-or-

A last record has already been written for this DIME message.

Remarks

Use the LastRecord method when it is known that the last DimeRecordof the DIME message is being written. No further records should be written after the LastRecord is called. When the NewRecord method is used to create the last record containing a positive payload length, Close will then be called and an additional empty last record will be appended to the DIME message. This occurs, for example, when the size of the message is not known and its payload is being chunked.

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

DimeWriter Class
Microsoft.Web.Services2.Dime Namespace

Other Resources

DimeWriter Members