Table of Contents

RequestAuthorityAsync

Methods
Task<RequestAuthorityResult> RequestAuthorityAsync(AuthorityType authorityType, CancellationToken cancellationToken = default)

Requests authority over this entity.

Parameters
Type Name Description
AuthorityType authorityType

Type of authority transferred.

CancellationToken cancellationToken

Token that can be used to cancel the authority request.

Returns
Type Description
Task<RequestAuthorityResult>

Task representing the asynchronous operation.

Remarks

Requires a valid CoherenceBridge instance to process the request.
Cancelling cancellationToken (or destroying the entity) completes the returned task with Canceled. This only stops awaiting the result; it does not recall an authority request that has already been sent, so authority may still be granted. The request is only prevented from being sent if the token is already cancelled when this method is called.