Class XmlContentDeserializer
- Namespace
 - Kampute.HttpClient.Xml
 
- Assembly
 - Kampute.HttpClient.Xml.dll
 
Provides functionality for deserializing XML content from HTTP responses into objects.
public sealed class XmlContentDeserializer : HttpContentDeserializer, IHttpContentDeserializer
  - Inheritance
 - 
      
      
      XmlContentDeserializer
 
- Implements
 
- Inherited Members
 
Constructors
XmlContentDeserializer()
Initializes a new instance of the XmlContentDeserializer class.
public XmlContentDeserializer()
  Methods
DeserializeAsync(HttpContent, Type, CancellationToken)
Asynchronously reads an object from the provided HttpContent.
public override Task<object?> DeserializeAsync(HttpContent content, Type modelType, CancellationToken cancellationToken = default)
  Parameters
contentHttpContentThe HttpContent to read from.
modelTypeTypeThe type of the object to read.
cancellationTokenCancellationTokenA token for canceling the read operation (optional).
Returns
- Task<object>
 A task representing the asynchronous read operation, containing the deserialized object.
Exceptions
- ArgumentNullException
 Thrown if
contentormodelTypeis null.