Table of Contents

RefreshFriendsAsync

Methods
public FriendsOperation<ReadOnlyCollection<Friend>> RefreshFriendsAsync(CancellationToken cancellationToken = default)

Fetches the player's friends from coherence Cloud, updating Friends.

Parameters
Type Name Description
CancellationToken cancellationToken

Cancels the request.

Returns
Type Description
FriendsOperation<ReadOnlyCollection<Friend>>
Remarks

SyncFriendsAsync(string, IReadOnlyList<string>, CancellationToken) already leaves the list up to date. Use this to read the list without syncing, or after the player was away long enough that you would rather be sure.

Changes acknowledged when running this method will trigger OnFriendRemoved, OnFriendAdded and OnFriendPresenceChanged events.

Exceptions
Type Condition
ObjectDisposedException

This service has been disposed. Thrown at the call site rather than reported through the returned request.