Class Leaderboard
A read-only
Inheritance
System.Object
Leaderboard
Namespace: R6Stats.Response
Assembly: R6Stat-Sharp.dll
Syntax
public sealed class Leaderboard : IReadOnlyList<LeaderboardSlot>, IReadOnlyCollection<LeaderboardSlot>, IEnumerable<LeaderboardSlot>, IPayload
Properties
| Improve this Doc View SourceCount
Count of players in the learderboard (should always be 100)
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Item[Int32]
Get user info for a leaderboard index
Declaration
public LeaderboardSlot this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | An index starting from 0 |
Property Value
| Type | Description |
|---|---|
| LeaderboardSlot | User info for the user in the specified index |
Item[String]
Get user info for a username from a leaderboard
Declaration
public LeaderboardSlot this[string username] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username to be parsed |
Property Value
| Type | Description |
|---|---|
| LeaderboardSlot | User info for the specified username, if not found returns the null/> |
Top10
Get the top 10 player of the leaderboard
Declaration
public IEnumerable<LeaderboardSlot> Top10 { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<LeaderboardSlot> |
Methods
| Improve this Doc View SourceGetEnumerator()
Declaration
public IEnumerator<LeaderboardSlot> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<LeaderboardSlot> |
TryGetPlayer(String, out LeaderboardSlot)
Safely search for a player in the leaderboard.
Declaration
public bool TryGetPlayer(string username, out LeaderboardSlot player)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | username | Username to be searched in the leaderboard |
| LeaderboardSlot | player | Stats of the searched player if the return value is true |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the player is present in the leaderboard, false if the player is not found |
Implements
IReadOnlyCollection<>
IEnumerable<>