ReqRest
Show / Hide Table of Contents

Interface IHttpContentDeserializer

Represents an element which is able to deserialize .NET objects from an HttpContent instance.

Consider deriving from HttpContentSerializer instead of implementing this interface directly.

Namespace: ReqRest.Serializers
Assembly: ReqRest.dll
Syntax
public interface IHttpContentDeserializer

Methods

DeserializeAsync(Nullable<HttpContent>, Type)

Deserializes an object of the specified contentType from the httpContent.

Declaration
Task<object? > DeserializeAsync(HttpContent? httpContent, Type contentType)
Parameters
Type Name Description
Nullable<HttpContent> httpContent

An HttpContent instance from which the content should be serialized. This can be null.

Type contentType

The target type of the object which is supposed to be deserialized.

Returns
Type Description
Task<Nullable<Object>>

An object of type contentType.

Exceptions
Type Condition
ArgumentNullException
  • contentType
HttpContentSerializationException

Deserializing the content failed.

Extension Methods

HttpContentDeserializerExtensions.DeserializeAsync<T>(IHttpContentDeserializer, Nullable<HttpContent>)
Back to top Copyright © 2019 ReqRest - Generated with DocFX - Material Theme made by Oscar Vásquez - Impressum (Imprint)