ObjectContent<T> Constructor (T, MediaTypeFormatter, String)
Initializes a new instance of the ObjectContent<T> class.
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Sub New ( _
value As T, _
formatter As MediaTypeFormatter, _
mediaType As String _
)
'Usage
Dim value As T
Dim formatter As MediaTypeFormatter
Dim mediaType As String
Dim instance As New ObjectContent(value, formatter, _
mediaType)
public ObjectContent(
T value,
MediaTypeFormatter formatter,
string mediaType
)
public:
ObjectContent(
T value,
MediaTypeFormatter^ formatter,
String^ mediaType
)
new :
value:'T *
formatter:MediaTypeFormatter *
mediaType:string -> ObjectContent
public function ObjectContent(
value : T,
formatter : MediaTypeFormatter,
mediaType : String
)
Parameters
value
Type: TThe value of the object this instance will contain.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatterThe formatter to use when serializing the value.
mediaType
Type: System.StringThe authoritative value of the Content-Type header.