메시지 작성기에 사용되는 메시지에 콘텐츠 유형 및 데이터 서비스 버전 헤더를 설정합니다.
네임스페이스: Microsoft.Data.OData
어셈블리: Microsoft.Data.OData(Microsoft.Data.OData.dll)
구문
‘선언
Public Shared Function SetHeadersForPayload ( _
messageWriter As ODataMessageWriter, _
payloadKind As ODataPayloadKind _
) As ODataFormat
‘사용 방법
Dim messageWriter As ODataMessageWriter
Dim payloadKind As ODataPayloadKind
Dim returnValue As ODataFormat
returnValue = ODataUtils.SetHeadersForPayload(messageWriter, _
payloadKind)
public static ODataFormat SetHeadersForPayload(
ODataMessageWriter messageWriter,
ODataPayloadKind payloadKind
)
public:
static ODataFormat^ SetHeadersForPayload(
ODataMessageWriter^ messageWriter,
ODataPayloadKind payloadKind
)
static member SetHeadersForPayload :
messageWriter:ODataMessageWriter *
payloadKind:ODataPayloadKind -> ODataFormat
public static function SetHeadersForPayload(
messageWriter : ODataMessageWriter,
payloadKind : ODataPayloadKind
) : ODataFormat
매개 변수
- messageWriter
유형: Microsoft.Data.OData.ODataMessageWriter
헤더를 설정할 메시지 작성기입니다.
- payloadKind
유형: Microsoft.Data.OData.ODataPayloadKind
메시지 작성기로 작성할 페이로드 종류입니다.
반환 값
유형: Microsoft.Data.OData.ODataFormat
메시지 작성기에 사용되는 메시지에 콘텐츠 유형 및 데이터 서비스 버전 헤더입니다.
주의
이 메서드는 messageWriter에서 Write 메서드를 호출하기 전에 모든 메시지 헤더를 설정하는 것이 중요할 경우 호출할 수 있습니다. messageWriter에서 Write 메서드를 호출할 때 헤더를 설정하는 것으로 충분할 경우 이 메서드를 호출하지 않아도 되며 헤더 설정이 자동으로 수행됩니다.