public LeaderboardEntry GetLeaderboard(LeaderboardIdentity leaderboardId) { // FIXME: Should we just magically have leaderboards by this point? -flibit if (!LeaderboardReader.Leaderboards.ContainsKey(leaderboardId.Key)) { latestKey = leaderboardId.Key; SteamAPICall_t call = SteamUserStats.FindLeaderboard(leaderboardId.Key); if (call.m_SteamAPICall != 0) { CallResult <LeaderboardFindResult_t> foundLeaderboard; foundLeaderboard = new CallResult <LeaderboardFindResult_t>(); foundLeaderboard.Set( call, OnLeaderboardFound ); while (GamerServicesDispatcher.UpdateAsync()) { if (string.IsNullOrEmpty(latestKey)) { break; } } } } // FIXME: Do these other parameters even matter? -flibit return(new LeaderboardEntry( null, 0, 0, LeaderboardReader.Leaderboards[leaderboardId.Key] )); }
public static LeaderboardReader Read( LeaderboardIdentity leaderboardId, IEnumerable <Gamer> gamers, Gamer pivotGamer, int pageSize ) { IAsyncResult result = BeginRead( leaderboardId, gamers, pivotGamer, pageSize, null, null ); while (!result.IsCompleted) { if (!GamerServicesDispatcher.UpdateAsync()) { // readAction.IsCompleted = true; } } return(EndRead(result)); }
public static IAsyncResult BeginRead( LeaderboardIdentity leaderboardId, IEnumerable <Gamer> gamers, Gamer pivotGamer, int pageSize, AsyncCallback callback, object asyncState ) { readAction = new LeaderboardReaderAction( asyncState, callback, leaderboardId, 0, pageSize, pivotGamer, gamers ); if (readAction.Leaderboard.m_SteamLeaderboard == 0) { FindLeaderboard(leaderboardId.Key); } else { DownloadEntries(); } return(readAction); }
public static IAsyncResult BeginRead( LeaderboardIdentity leaderboardId, int pageStart, int pageSize, AsyncCallback callback, object asyncState ) { readAction = new LeaderboardReaderAction( asyncState, callback, leaderboardId, pageStart, pageSize, null, null ); if (readAction.Leaderboard.m_SteamLeaderboard == 0) { FindLeaderboard(leaderboardId.Key); } else { DownloadEntries(); } return(readAction); }
internal LeaderboardReader( LeaderboardIdentity identity, int start, int size, SteamLeaderboard_t board, List <LeaderboardEntry> entries, bool friends ) { LeaderboardIdentity = identity; PageStart = start; pageSize = size; leaderboard = board; TotalLeaderboardSize = SteamUserStats.GetLeaderboardEntryCount(leaderboard); isFriendBoard = friends; entryCache = entries; this.entries = new List <LeaderboardEntry>(pageSize); for (int i = PageStart; i < pageSize && i < entryCache.Count; i += 1) { this.entries.Add(entryCache[i]); } IsDisposed = false; }
public static IAsyncResult BeginRead( LeaderboardIdentity leaderboardId, Gamer pivotGamer, int pageSize, AsyncCallback callback, object asyncState ) { throw new NotSupportedException(); }
public static LeaderboardReader Read( LeaderboardIdentity leaderboardId, int pageStart, int pageSize ) { IAsyncResult result = BeginRead( leaderboardId, pageStart, pageSize, null, null ); while (!result.IsCompleted) { if (!GamerServicesDispatcher.UpdateAsync()) { readAction.IsCompleted = true; } } return(EndRead(result)); }
public LeaderboardReaderAction( object state, AsyncCallback callback, LeaderboardIdentity identity, int start, int size, Gamer pivot, IEnumerable <Gamer> gamers ) { AsyncState = state; Callback = callback; IsCompleted = false; AsyncWaitHandle = new ManualResetEvent(true); ID = identity; PageStart = start; PageSize = size; PivotGamer = pivot; Gamers = gamers; Leaderboards.TryGetValue(ID.Key, out Leaderboard); }
internal LeaderboardEntry GetLeaderboard(LeaderboardIdentity leaderboardIdentity) { throw new NotImplementedException(); }
public LeaderboardEntry GetLeaderboard(LeaderboardIdentity aLeaderboardIdentity) { throw new NotImplementedException(); }
public LeaderboardEntry GetLeaderboard(LeaderboardIdentity aLeaderboardIdentity) { throw new NotImplementedException (); }
public static void BeginRead (LeaderboardIdentity id, SignedInGamer gamer, int leaderboardPageSize, AsyncCallback leaderboardReadCallback, SignedInGamer gamer2) { throw new NotImplementedException (); }
public static void BeginRead(LeaderboardIdentity id, SignedInGamer gamer, int leaderboardPageSize, AsyncCallback leaderboardReadCallback, SignedInGamer gamer2) { throw new NotImplementedException(); }