Table of Contents

Class RawStreamHandler

Namespace
Honua.Sdk.OgcFeatures.Wfs.Formats
Assembly
Honua.Sdk.OgcFeatures.dll

Returns the raw WFS response stream without parsing. Useful for GML, CSV, or other formats where the caller handles deserialization.

public sealed class RawStreamHandler : IWfsOutputFormatHandler<Stream>
Inheritance
RawStreamHandler
Implements
Inherited Members

Remarks

The caller is responsible for disposing the returned stream.

Constructors

RawStreamHandler(string)

Initializes a new instance with the specified media type.

public RawStreamHandler(string mediaType = "application/gml+xml; version=3.2")

Parameters

mediaType string

The MIME type to request (default: GML 3.2).

Properties

MediaType

The MIME type to request from the WFS server (used as the OUTPUTFORMAT parameter value).

public string MediaType { get; }

Property Value

string

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.

public bool OwnsResponseStream { get; }

Property Value

bool

Methods

ReadAsync(Stream, CancellationToken)

Reads and deserializes the response stream.

public Task<Stream> ReadAsync(Stream responseStream, CancellationToken cancellationToken = default)

Parameters

responseStream Stream

The HTTP response body stream.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<Stream>

The deserialized result.