Share via


DimeWriter.NewRecord Method ()

Creates and returns a new DIME record with default ID, payload type and format that uses chunked mode.

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

Usage

'Usage
Dim returnValue As DimeRecord
Dim dimeWriter1 As DimeWriter
returnValue = dimeWriter1.NewRecord()

Syntax

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

Return Value

The next DimeRecord to write in the DIME message with the specified values.

Exceptions

Exception type Condition
System.InvalidOperationException

Either the DIME message has been closed.

-or-

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

Remarks

The default payload type is "application/octet-stream" and the default typeFormat is "TypeFormatEnum.MediaType".

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