Share via


FramingWriter.NewRecord Method (String, String, FramingTypeFormat, Int32)

Creates and returns a new framed record with a specified ID and of a specified payload type, typeFormat, and length.

Namespace: Microsoft.Web.Services3.Messaging.Framing
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim id As String
Dim type As String
Dim typeFormat As FramingTypeFormat
Dim contentLength As Integer
Dim returnValue As FramingRecord
Dim framingWriter1 As FramingWriter
returnValue = framingWriter1.NewRecord(id, type, typeFormat, contentLength)

Syntax

'Declaration
Overloads Public Function NewRecord( _
    ByVal id As String, _
    ByVal type As String, _
    ByVal typeFormat As FramingTypeFormat, _
    ByVal contentLength As Integer _
) As FramingRecord
public FramingRecord NewRecord(
    string id, 
    string type, 
    FramingTypeFormat typeFormat, 
    int contentLength
);
public:
FramingRecord^ NewRecord(
    String^ id,
    String^ type,
    FramingTypeFormat typeFormat,
    int contentLength
);
public FramingRecord NewRecord(
    System.String id, 
    System.String type, 
    FramingTypeFormat typeFormat, 
    int contentLength
);
public function NewRecord(
     id : String, 
     type : String, 
     typeFormat : FramingTypeFormat, 
     contentLength : int
) : FramingRecord;

Parameters

  • id
    A System.Uri containing the absolute or relative URI identifying the record.
  • type
    The payload type.
  • typeFormat
    One of the FramingTypeFormat values that specifies the format of the payload type.
  • contentLength
    The number of bytes to be written to the new record.

Return Value

The next FramingRecord to write in the framed message with the specified values.

Exceptions

Exception type Condition
ArgumentNullException

The id or type is null .

InvalidOperationException

Either the framed message has been closed.

-or-

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

Remarks

If the length of the payload is not known, then the contentLength property should be set to a value of -1 to specify chunked records.

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