RequestUserStats to RequestUserStatsAsync

This commit is contained in:
Garry Newman 2020-02-24 13:28:27 +00:00
parent 52ecc0b594
commit 23b3304332
4 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ public class GameServerStatsTest
[TestMethod] [TestMethod]
public async Task GetAchievement() public async Task GetAchievement()
{ {
var result = await SteamServerStats.RequestUserStats( Garry ); var result = await SteamServerStats.RequestUserStatsAsync( Garry );
Assert.AreEqual( result, Result.OK ); Assert.AreEqual( result, Result.OK );
var value = SteamServerStats.GetAchievement( Garry, "COLLECT_100_WOOD" ); var value = SteamServerStats.GetAchievement( Garry, "COLLECT_100_WOOD" );

View File

@ -174,7 +174,7 @@ public async Task GetFriendStats()
var friend = new Friend( 76561197965732579 ); // Hezzy var friend = new Friend( 76561197965732579 ); // Hezzy
// Download stats // Download stats
var status = await friend.RequestUserStats(); var status = await friend.RequestUserStatsAsync();
Assert.AreNotEqual( false, status ); Assert.AreNotEqual( false, status );
var deaths = friend.GetStatInt( "deaths" ); var deaths = friend.GetStatInt( "deaths" );

View File

@ -22,7 +22,7 @@ internal override void InitializeInterface( bool server )
/// If the user has no stats will return fail /// If the user has no stats will return fail
/// these stats will only be auto-updated for clients playing on the server /// these stats will only be auto-updated for clients playing on the server
/// </summary> /// </summary>
public static async Task<Result> RequestUserStats( SteamId steamid ) public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
{ {
var r = await Internal.RequestUserStats( steamid ); var r = await Internal.RequestUserStats( steamid );
if ( !r.HasValue ) return Result.Fail; if ( !r.HasValue ) return Result.Fail;

View File

@ -189,7 +189,7 @@ public bool SendMessage( string message )
/// Tries to get download the latest user stats /// Tries to get download the latest user stats
/// </summary> /// </summary>
/// <returns>True if successful, False if failure</returns> /// <returns>True if successful, False if failure</returns>
public async Task<bool> RequestUserStats() public async Task<bool> RequestUserStatsAsync()
{ {
var result = await SteamUserStats.Internal.RequestUserStats( Id ); var result = await SteamUserStats.Internal.RequestUserStats( Id );
return result.HasValue && result.Value.Result == Result.OK; return result.HasValue && result.Value.Result == Result.OK;