Table of Contents

Class UserDataServiceExtensions

Namespace
Uncreated.Warfare.Players
Assembly
Uncreated.Warfare.dll
public static class UserDataServiceExtensions
Inheritance
UserDataServiceExtensions
Inherited Members

Methods

GetUsernamesAsync(IUserDataService, IEnumerable<ulong>, CancellationToken)

Get multiple players' stored username data in bulk. Not necessarily returned in the same order as it was inputted.

public static Task<PlayerNames[]> GetUsernamesAsync(this IUserDataService dataService, IEnumerable<ulong> steamIds, CancellationToken token = default)

Parameters

dataService IUserDataService
steamIds IEnumerable<ulong>
token CancellationToken

Returns

Task<PlayerNames[]>

SearchPlayersAsync(IUserDataService, string, PlayerNameType, bool, int, CancellationToken)

Search all players that have ever joined by their usernames, and add them to a collection as they're found.

public static Task<List<PlayerNames>> SearchPlayersAsync(this IUserDataService dataService, string input, PlayerNameType prioritizedName, bool byLastJoined, int limit = -1, CancellationToken token = default)

Parameters

dataService IUserDataService
input string
prioritizedName PlayerNameType

The type of name to prioritize.

byLastJoined bool

If they should be ordered by the last time they joined. Exact matches will still be prioritized.

limit int
token CancellationToken

Returns

Task<List<PlayerNames>>

All matches in order of relevance.