Class ResourceTransformRequestHandle
- Namespace
- Maplibre.NativeFfi
- Assembly
- Maplibre.NativeFfi.dll
A URL rewrite that a resource transform answers with the URL to load.
public sealed class ResourceTransformRequestHandle : IDisposable
- Inheritance
-
ResourceTransformRequestHandle
- Implements
- Inherited Members
Remarks
See mln_resource_transform_request in the C API reference.
Properties
Id
The native handle value. It stays readable after release.
public ulong Id { get; }
Property Value
IsClosed
Whether a release, dispose, or discard has ended the handle.
public bool IsClosed { get; }
Property Value
Methods
Complete(string)
Answers a resource transform request with the URL to load instead.
public void Complete(string url)
Parameters
urlstring
Remarks
url must not be empty. A failed answer fails the request
with ResourceErrorReason.Other, as
ResourceTransformRequestHandle.Release() does.
See mln_resource_transform_request_complete in the C API reference.
Fail(ResourceTransformError)
Fails a resource transform request without sending it.
public void Fail(ResourceTransformError error)
Parameters
errorResourceTransformError
Remarks
The library retries a request that failed for a reason it retries,
such as ResourceErrorReason.Connection, and the retry calls the
transform again. When this call fails, the request fails with
ResourceErrorReason.Other, as
ResourceTransformRequestHandle.Release() does.
See mln_resource_transform_request_fail in the C API reference.
Release()
Releases a resource transform request.
public void Release()
Remarks
Releasing a request without an answer fails it with
ResourceErrorReason.Other.
See mln_resource_transform_request_release in the C API reference.
ToString()
Names the handle's type, its Id, and whether it is closed.
public override string ToString()