Class HttpContentDecorator
- Namespace
- Kampute.HttpClient.Content.Abstracts
- Assembly
- Kampute.HttpClient.dll
Serves as a base class for decorating HttpContent instances.
public abstract class HttpContentDecorator : HttpContent, IDisposable
- Inheritance
-
HttpContentDecorator
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
This class provides common functionality such as copying headers from the original content and managing the lifecycle of the wrapped content.
Constructors
HttpContentDecorator(HttpContent)
Initializes a new instance of the HttpContentDecorator class.
protected HttpContentDecorator(HttpContent content)
Parameters
content
HttpContentThe HTTP content to decorate. This content will be disposed when this decorator instance is disposed.
Exceptions
- ArgumentNullException
Thrown when
content
is null.
Properties
OriginalContent
Gets the original HTTP content that this instance decorates.
protected HttpContent OriginalContent { get; }
Property Value
Methods
Dispose(bool)
Releases the unmanaged resources used by the HttpContent and optionally disposes of the managed resources.
protected override void Dispose(bool disposing)