From 35c41ee58ff068c43de92ad35befd25f4b460cf8 Mon Sep 17 00:00:00 2001
From: BoBoBaSs84 <73112377+BoBoBaSs84@users.noreply.github.com>
Date: Fri, 28 Jun 2024 16:49:34 +0200
Subject: [PATCH] refac: method names
changes:
- renamed `Init(int appId)` to `Initialize(int appId)`
- renamed `RequestCurrentStats()` to `RequestStats()`
closes #18
---
.../Interfaces/Infrastructure/Services/ISteamApiService.cs | 4 ++--
src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs | 4 ++--
src/BB84.SAU.Infrastructure/Services/SteamApiService.cs | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/BB84.SAU.Application/Interfaces/Infrastructure/Services/ISteamApiService.cs b/src/BB84.SAU.Application/Interfaces/Infrastructure/Services/ISteamApiService.cs
index 2fa4e60..0e101fa 100644
--- a/src/BB84.SAU.Application/Interfaces/Infrastructure/Services/ISteamApiService.cs
+++ b/src/BB84.SAU.Application/Interfaces/Infrastructure/Services/ISteamApiService.cs
@@ -29,7 +29,7 @@ public interface ISteamApiService
///
/// The Steamworks API will not initialize if it does not know the App ID of your game.
/// True, if the api is initialized, otherwise false.
- bool Init(int appId);
+ bool Initialize(int appId);
///
/// When done using the Steamworks API you should call to release the resources used
@@ -65,7 +65,7 @@ public interface ISteamApiService
/// You must always call this first to get the initial status of stats and achievements.
///
/// True, if the request was successful, otherwise false.
- bool RequestCurrentStats();
+ bool RequestStats();
///
/// Send the changed stats and achievements data to the server for permanent storage.
diff --git a/src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs b/src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs
index b1e1437..9097010 100644
--- a/src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs
+++ b/src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs
@@ -203,10 +203,10 @@ private void OnPropertyChanged(string? propertyName)
if (propertyName == nameof(Model))
{
if (_steamApiService.Initialized.IsFalse())
- _steamApiService.Init(Model.Id);
+ _steamApiService.Initialize(Model.Id);
if (_steamApiService.StatsRequested.IsFalse())
- _steamApiService.RequestCurrentStats();
+ _steamApiService.RequestStats();
}
if (propertyName == nameof(SelectedAchievement) && SelectedAchievement is not null)
diff --git a/src/BB84.SAU.Infrastructure/Services/SteamApiService.cs b/src/BB84.SAU.Infrastructure/Services/SteamApiService.cs
index 8827b85..965fdbe 100644
--- a/src/BB84.SAU.Infrastructure/Services/SteamApiService.cs
+++ b/src/BB84.SAU.Infrastructure/Services/SteamApiService.cs
@@ -28,7 +28,7 @@ internal sealed class SteamApiService(ILoggerService loggerServ
public bool Initialized => AppId is not null;
public bool StatsRequested { get; private set; }
- public bool Init(int appId)
+ public bool Initialize(int appId)
{
try
{
@@ -49,7 +49,7 @@ public bool Init(int appId)
}
}
- public bool RequestCurrentStats()
+ public bool RequestStats()
{
try
{