ObjectContent Constructor
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
| Name | Description | |
|---|---|---|
![]() | ObjectContent(Type^, Object^, MediaTypeFormatter^) | Initializes a new instance of the ObjectContent class. |
![]() | ObjectContent(Type^, Object^, MediaTypeFormatter^, MediaTypeHeaderValue^) | Initializes a new instance of the ObjectContent class. |
![]() | ObjectContent(Type^, Object^, MediaTypeFormatter^, String^) | Initializes a new instance of the ObjectContent class. |
ObjectContent Constructor (Type^, Object^, MediaTypeFormatter^)
Initializes a new instance of the ObjectContent class.
Parameters
- type
-
Type:
System::Type^
The type of object this instance will contain.
- value
-
Type:
System::Object^
The value of the object this instance will contain.
- formatter
-
Type:
System.Net.Http.Formatting::MediaTypeFormatter^
The formatter to use when serializing the value.
ObjectContent Constructor (Type^, Object^, MediaTypeFormatter^, MediaTypeHeaderValue^)
Initializes a new instance of the ObjectContent class.
public: ObjectContent( Type^ type, Object^ value, MediaTypeFormatter^ formatter, MediaTypeHeaderValue^ mediaType )
Parameters
- type
-
Type:
System::Type^
The type of object this instance will contain.
- value
-
Type:
System::Object^
The value of the object this instance will contain.
- formatter
-
Type:
System.Net.Http.Formatting::MediaTypeFormatter^
The formatter to use when serializing the value.
- mediaType
-
Type:
System.Net.Http.Headers::MediaTypeHeaderValue^
The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used.
ObjectContent Constructor (Type^, Object^, MediaTypeFormatter^, String^)
Initializes a new instance of the ObjectContent class.
public: ObjectContent( Type^ type, Object^ value, MediaTypeFormatter^ formatter, String^ mediaType )
Parameters
- type
-
Type:
System::Type^
The type of object this instance will contain.
- value
-
Type:
System::Object^
The value of the object this instance will contain.
- formatter
-
Type:
System.Net.Http.Formatting::MediaTypeFormatter^
The formatter to use when serializing the value.
- mediaType
-
Type:
System::String^
The authoritative value of the Content-Type header.
