Export (0) Print
Expand All

ObjectContent<T> Class

Generic form of ObjectContent.

System.Object
  HttpContent
    System.Net.Http.ObjectContent
      System.Net.Http.ObjectContent<T>

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public class ObjectContent<T> : ObjectContent

Type Parameters

T

The type of object this class will contain.

The ObjectContent<T> type exposes the following members.

  NameDescription
Public methodObjectContent<T>(T, MediaTypeFormatter)Initializes a new instance of the ObjectContent<T> class.
Public methodObjectContent<T>(T, MediaTypeFormatter, MediaTypeHeaderValue) Initializes a new instance of the <see cref="T:System.Net.Http.ObjectContent`1" /> class.
Public methodObjectContent<T>(T, MediaTypeFormatter, String)Initializes a new instance of the ObjectContent<T> class.
Top

  NameDescription
Public propertyFormatterGets the media-type formatter associated with this content instance. (Inherited from ObjectContent.)
Public propertyHeadersGets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)
Public propertyObjectTypeGets the type of object managed by this ObjectContent instance. (Inherited from ObjectContent.)
Public propertyValueGets or sets the value of the content. (Inherited from ObjectContent.)
Top

  NameDescription
Public methodCopyToAsync(Stream)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public methodCopyToAsync(Stream, TransportContext)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodCreateContentReadStreamAsync (Inherited from HttpContent.)
Public methodDisposeReleases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the HttpContent and optionally disposes of the managed resources. (Inherited from HttpContent.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodLoadIntoBufferAsyncSerialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public methodLoadIntoBufferAsync(Int64) (Inherited from HttpContent.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadAsByteArrayAsync (Inherited from HttpContent.)
Public methodReadAsStreamAsync (Inherited from HttpContent.)
Public methodReadAsStringAsync (Inherited from HttpContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext)Asynchronously serializes the object's content to the given stream. (Inherited from ObjectContent.)
Protected methodSerializeToStreamAsync(Stream, TransportContext)Serialize the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public methodToString (Inherited from Object.)
Protected methodTryComputeLengthComputes the length of the stream if possible. (Inherited from ObjectContent.)
Top

  NameDescription
Public Extension MethodGetODataMessageReaderAsync(ODataMessageReaderSettings)Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)
Public Extension MethodGetODataMessageReaderAsync(ODataMessageReaderSettings)Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)
Public Extension MethodGetODataMessageReaderAsync(ODataMessageReaderSettings, CancellationToken)Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)
Public Extension MethodGetODataMessageReaderAsync(ODataMessageReaderSettings, CancellationToken)Overloaded. Gets the ODataMessageReader for the HttpContent stream. (Defined by ODataHttpContentExtensions.)
Public Extension MethodIsFormDataDetermines whether the specified content is HTML form URL-encoded data. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodIsHttpRequestMessageContentDetermines whether the specified content is HTTP request message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsHttpResponseMessageContentDetermines whether the specified content is HTTP response message content. (Defined by HttpContentMessageExtensions.)
Public Extension MethodIsMimeMultipartContent()Overloaded. Determines whether the specified content is MIME multipart content. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodIsMimeMultipartContent(String)Overloaded. Determines whether the specified content is MIME multipart content with the specified subtype. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsAsync(Type)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync(Type, IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>()Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>)Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger)Overloaded. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsAsync<T>(IEnumerable<MediaTypeFormatter>, IFormatterLogger, CancellationToken)Overloaded. Returns a Task that will yield an object of the specified type from the content instance. (Defined by HttpContentExtensions.)
Public Extension MethodReadAsFormDataAsync()Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsFormDataAsync(CancellationToken)Overloaded. Asynchronously reads HTML form URL-encoded from an HttpContent instance and stores the results in a NameValueCollection object. (Defined by HttpContentFormDataExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync()Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32)Overloaded. Reads the HttpContent as an HttpRequestMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpRequestMessageAsync(String, Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync()Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32)Overloaded. Reads the HttpContent as an HttpResponseMessage. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsHttpResponseMessageAsync(Int32, Int32, CancellationToken)Overloaded. (Defined by HttpContentMessageExtensions.)
Public Extension MethodReadAsMultipartAsync()Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync(CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, Int32)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. (Defined by HttpContentMultipartExtensions.)
Public Extension MethodReadAsMultipartAsync<T>(T, Int32, CancellationToken)Overloaded. Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. (Defined by HttpContentMultipartExtensions.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft