Interface IWfsOutputFormatHandler<TResult>
- Namespace
- Honua.Sdk.OgcFeatures.Wfs.Formats
- Assembly
- Honua.Sdk.OgcFeatures.dll
Handles deserialization of a WFS GetFeature response in a specific output format.
public interface IWfsOutputFormatHandler<TResult>
Type Parameters
TResultThe deserialized result type.
Remarks
When MediaType is an XML-based format (e.g. GML), the client skips probing successful (HTTP 200) responses for OGC ExceptionReport to avoid materializing the entire body. If the server returns a 200-status ExceptionReport instead of the expected format, it will be passed through to ReadAsync(Stream, CancellationToken) as-is. Handlers for XML formats should be prepared to handle this edge case.
Properties
MediaType
The MIME type to request from the WFS server (used as the OUTPUTFORMAT parameter value).
string MediaType { get; }
Property Value
OwnsResponseStream
Indicates whether the handler retains ownership of the HTTP response stream after
ReadAsync(Stream, CancellationToken) returns. When true, the client will not dispose the
underlying HTTP response, and the caller is responsible for disposing the returned result.
Default is false.
bool OwnsResponseStream { get; }
Property Value
Methods
ReadAsync(Stream, CancellationToken)
Reads and deserializes the response stream.
Task<TResult> ReadAsync(Stream responseStream, CancellationToken cancellationToken = default)
Parameters
responseStreamStreamThe HTTP response body stream.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TResult>
The deserialized result.