Skip to main content

GeolocationResult

Namespace: BlazorNative.Core

The terminal outcome of a IMobileBridge.GetCurrentPositionAsync(CancellationToken) call: a status and, only when GeolocationStatus.Granted, a position. Every non-Granted status carries a null position.

public readonly record struct GeolocationResult

Inheritance Object → ValueType → GeolocationResult
Implements IEquatable<GeolocationResult>
Attributes IsReadOnlyAttribute

Properties​

Status​

The permission/fetch outcome.

public GeolocationStatus Status { get; init; }

Property Value​

GeolocationStatus

Position​

The fix on GeolocationStatus.Granted, else null.

public GeolocationPosition? Position { get; init; }

Property Value​

GeolocationPosition?

Constructors​

GeolocationResult(GeolocationStatus, GeolocationPosition?)​

The terminal outcome of a IMobileBridge.GetCurrentPositionAsync(CancellationToken) call: a status and, only when GeolocationStatus.Granted, a position. Every non-Granted status carries a null position.

public GeolocationResult(GeolocationStatus Status, GeolocationPosition? Position)

Parameters​

Status GeolocationStatus
The permission/fetch outcome.

Position GeolocationPosition?
The fix on GeolocationStatus.Granted, else null.