FramingWriter.LastRecord Method ()
Gets the last record in the stream. Creates and returns the last record in a framed message with default ID, payload type and format that uses chunked mode.
Namespace: Microsoft.Web.Services3.Messaging.Framing
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Usage
'Usage
Dim returnValue As FramingRecord
Dim framingWriter1 As FramingWriter
returnValue = framingWriter1.LastRecord()
Syntax
'Declaration
Overloads Public Function LastRecord() As FramingRecord
public FramingRecord LastRecord();
public:
FramingRecord^ LastRecord();
public FramingRecord LastRecord();
public function LastRecord() : FramingRecord;
Return Value
The last FramingRecord in the stream.
Exceptions
Exception type | Condition |
---|---|
InvalidOperationException | Either the framed message has been closed. -or- A last record has already been written for this framed message. |
Remarks
Use the LastRecord method when it is known that the last FramingRecord of the framed 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 framed 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 2000, Windows 2000 Server, Windows 2000 Advanced Server
Target Platforms
See Also
Reference
FramingWriter Class
FramingWriter Members
Microsoft.Web.Services3.Messaging.Framing Namespace