Show / Hide Table of Contents

Class Leaderboard

A read-only which contains the contents of a leaderboard starting from the first place

Inheritance
System.Object
Leaderboard
Implements
IReadOnlyCollection<LeaderboardSlot>
IEnumerable<LeaderboardSlot>
IPayload
Namespace: R6Stats.Response
Assembly: R6Stat-Sharp.dll
Syntax
public sealed class Leaderboard : IReadOnlyList<LeaderboardSlot>, IReadOnlyCollection<LeaderboardSlot>, IEnumerable<LeaderboardSlot>, IPayload

Properties

| Improve this Doc View Source

Count

Count of players in the learderboard (should always be 100)

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

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

| Improve this Doc View Source

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/>

| Improve this Doc View Source

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 Source

GetEnumerator()

Declaration
public IEnumerator<LeaderboardSlot> GetEnumerator()
Returns
Type Description
IEnumerator<LeaderboardSlot>
| Improve this Doc View Source

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<>
IPayload
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX